xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sumit4dreams <sumit.kum...@wipro.com>
Subject how to embed Asian font while genrating PDF using FOP??
Date Thu, 02 Jul 2009 09:17:34 GMT

I have been trying to embed Asian font while genrating PDF using FOP. I am
not able to get a break through in this. I need a help as to how to
configure the whole thing like-
1) Where to keep my metric file, 
2) i have created a fop.xconf file which has the following data
    <renderer mime="application/pdf">
		<font-triplet name="arialuni" style="normal" weight="normal"/>

3) the arialuni.ttf font is placed in my directory
and the metric file is placed in D:/HEAD/applications/proj/config/

4) In my java code i have the following code
      FopFactory fopFactory = FopFactory.newInstance();
      FOUserAgent userAgent = fopFactory.newFOUserAgent();
      File userConfigXml = new
      TransformerFactory transformerFactory =
      File copyrightFile = new File(fileUpLoadTempDir +
      outputStream = new FileOutputStream(copyrightFile);
      outputStream = new BufferedOutputStream(outputStream);
      Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent,
      Transformer transformer = transformerFactory.newTransformer(new
      Source src = new DOMSource(copyrightDom);
      Result res = new SAXResult(fop.getDefaultHandler());
      transformer.transform(src, res);

This is all i have done till now. I am trying to call the fop.xconf file
from my java code.
Still i am getting # for the Asian Character. 
Definitly i am missing somethign or the whole process should not be done
this way.
Please some one help me out to resolve this. 


View this message in context: http://www.nabble.com/how-to-embed-Asian-font-while-genrating-PDF-using-FOP---tp24303664p24303664.html
Sent from the FOP - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

View raw message