cwhite Posted January 30, 2007 Share Posted January 30, 2007 I am trying to create a PDF report that contains Japanese character data that is selected from an Oracle database. I am able to create Excel, Rtf and HTML versions of the report with no problems at all. But when I try to create the PDF report the fields with the Japanese characters display blanks. I have tried everything I could think of. I even pasted some Hebrew text into one field in the database and I'm able to display that without any problem. I finally found some advice in the forums to set the following: pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H" When I do this I now get net.sf.jasperreports.engine.JRRuntimeException: Could not load the following fontpdfFontName : HeiseiKakuGo-W5pdfEncoding : UniJIS-UCS2-HisPdfEmbedded : true I have searched around everywhere and cannot find this font. I have installed all the Asian and European font packs from Adobe. How do I get this report to be able to find those fonts? Or where can I find the fonts to include them in my classpath? I'm really stuck here and it is very important that we are able to display Japanese, Chinese, Korean and many other languages in our reports. So I really need to find a way to do this. Thanks...Curtis Link to comment Share on other sites More sharing options...
sheikh Posted February 7, 2007 Share Posted February 7, 2007 hi,i am also creating reports in Unicode (urdu). my reports are generating well in pdf if i use the pdf font= arial.ttf and pdf encoding =identity-h with horizontal writing . if i use any other font except Arial.ttf then it does not show the unicode characters in pdf but it shows other characters in pdf Link to comment Share on other sites More sharing options...
sheikh Posted February 7, 2007 Share Posted February 7, 2007 hi,i am also creating reports in Unicode (urdu). my reports are generating well in pdf if i use the pdf font= arial.ttf and pdf encoding =identity-h with horizontal writing . if i use any other font except Arial.ttf then it does not show the unicode characters in pdf but it shows other characters in pdf Link to comment Share on other sites More sharing options...
hminocha Posted May 17, 2007 Share Posted May 17, 2007 Hi,Had the same problem that it could not load japanese font. Please make sure to include iTextAsian.jar in your classpath. Then follow the example given in the samples/font. Basically:Assuming ou have used SansSerif non-bold non-italic font in your jrxml: Code://One entry in the map for all fonts used (note: bold or italic will make it one more key)FontKey key = new FontKey("SansSerif", false, false);PdfFont("HeiseiKakuGo-W5", "UniJIS-UCS2-H", true);fontMap.put(key, font);exporter.setParameter(JRExporterParameter.FONT_MAP, fontMap);exporter.exportReport(); This should work. For chinese you could try using STSong-Light as pdffont, with encoding as UniGB-UCS2-H Link to comment Share on other sites More sharing options...
mobivs1244 Posted July 2, 2007 Share Posted July 2, 2007 hi,I am also trying to generate PDF with Chinese LanguageI have added the itext.jar and itextAsian.jar into the class path.I designed the xml file in ireport and set the text style as the attached image.when i start to view in pdf format in the ireport,the text didn't show corrected. waiting help! Link to comment Share on other sites More sharing options...
vellingiri Posted September 9, 2010 Share Posted September 9, 2010 I am attaching the working exampleThanksVellingiri D Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now