Jay
Thanks for that tip. My machine has the MSGothic.ttc font file which I
understand is used for Japanese characters.
1) From the MSGothic.ttc file, I created the MSGothic.xml file in the
/conf/ directory.
2) I changed the userconfig.xml file to have the Japanese fonts defined as
<font metrics-file="msgothic.xml" embed-file="D:\winnt\font\msgothic.ttc"
kerning="yes">
<font-triplet name="Gothic" style="normal" weight="normal"/>
<font-triplet name="Gothic" style="normal" weight="bold"/>
<font-triplet name="Gothic" style="italic" weight="normal"/>
<font-triplet name="Gothic" style="italic" weight="bold"/>
</font>
<font metrics-file="msmincho.xml" embed-file="Cyberbit.ttf" kerning="yes">
<font-triplet name="Mincho" style="normal" weight="normal"/>
<font-triplet name="Mincho" style="normal" weight="bold"/>
<font-triplet name="Mincho" style="italic" weight="normal"/>
<font-triplet name="Mincho" style="italic" weight="bold"/>
</font>
3) In my case FOP is called on the server side ( weblogic ) which has
FOP.JAR in classpath.
XSLTInputHandler input = new XSLTInputHandler(xmlFile, new
File(xslParam));
try {
ByteArrayOutputStream out = new ByteArrayOutputStream();
response.setContentType(CONTENT_TYPE);
Driver driver = new Driver();
String OS = System.getProperty("os.name");
driver.setLogger(log);
driver.setRenderer(Driver.RENDER_PDF);
driver.setOutputStream(out);
driver.render(input.getParser(), input.getInputSource());
byte[] content = out.toByteArray();
response.setContentLength(content.length);
response.getOutputStream().write(content);
response.getOutputStream().flush();
System.out.println("renderXML done");
} catch (Exception ex) {
ex.printStackTrace();
throw new ServletException(ex);
}
My question is how would FOP on weblogic know how to use the new
userconfig.xml file. I tried to add / update the MSGothic.xml /
userconfig.xml in FOP.JAR but I get read/write permissions errors on the
jar file. Let me know...
Thanks
Manoj
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
2005/02/02 13:25 cc:
Please respond to Subject: Re: XML ---> PDF
Japanese
fop-user
Just a thought:
Did you set up the necessary font-metrics file? You can find an example
(called cid-fonts.fo) in the examples\fo\advanced (Windows) or
examples/fo/advanced (Linux or Unix) directory.
Jay Bryant
Bryant Communication Services
(on contract at Syngergistic Solution Technologies)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]