Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML to PDF with Japanese characters.

Thread Tools

XML to PDF with Japanese characters.

Posts: n/a
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 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 ?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert PCL Files into PDF, CCIFF Encoding & Faster XML to PDF Conversion sherazam Java 0 09-26-2011 10:20 AM
Postscript to PDF with pdf-tools, pdf-writer, or other Sean Nakasone Ruby 1 04-14-2008 09:13 PM
PDF::Writer, create pdf and insert in other pdf file. Ricardo Pog Ruby 1 03-26-2008 08:24 PM
Combining PDF and XML files into PDF bill walton Ruby 1 12-03-2006 06:29 PM
Strangeness with Japanese, XML, Java Robert M. Gary Java 2 04-15-2005 09:19 PM