XML to PDF with Japanese characters.

D

debo_nair

I could successfully create PDF docs on fly from XML and open it
within acrobat using FOP. I have a servlet on weblogic which uses
XSLTInputHandler(xml,xsl) and renders the XML in PDF.

My problem is when there are Japanese Kanji characters in the XML file.
In the PDF it appears as junk ####. Now I have tried setting up
MSGothic and MS Arial Unicode font metrics in the userconfig.xml file
for FOP. I have created the corresponding font metrics file also using
the TTFReader in FOP.

I have then in the servlet loaded userConfigFile file as follows as
mentioned in apache.org website.
userConfigFile = new File(userConfig);
options = new Options(userConfigFile);

But for some reason I still get the junk characters. I have opened the
XML in IE and the japanese characters appear correct. It appears that
the FOP driver doesnt get the fonts correctly. Anyone done this before?


Do i need to make any change to the XSL file ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top