2006 IR Open Discussion Posted August 18, 2006 Share Posted August 18, 2006 By: Tran Nguyen - ntbtran Display Unicode with TTC font using JR 2003-04-10 02:24 Does JasperReport support to use TTC font (i.e MSGothic.ttc) to display Japanese (Unicode) in Pdf-report ?? If I'd like to generate a Pdf-report in Japanese with JasperReport (and design with iReport tool), what should i do? Any other way ? I'm trying to use msgothic.ttc font with the pdfencoding BaseFont.IDENTITY_H, but the following exception thrown out (even though i already copy that ttc font to my current project directory): " Compile time : 2142 Filling time : 15990 com.lowagie.text.DocumentException: Font 'MSGOTHIC.TTC' with 'Identity-H' is not recognized. at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source) at dori.jasper.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:1009) at dori.jasper.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:346) at dori.jasper.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:295) at dori.jasper.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:217) at dori.jasper.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:135) at dori.jasper.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:117) at webreportdemo.ReportManager.generateReport(ReportManager.java:82) at webreportdemo.ReportManager.main(ReportManager.java:146) NESTED BY : dori.jasper.engine.JRException: PDF Document error : UnicodeReport at dori.jasper.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:304) at dori.jasper.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:217) at dori.jasper.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:135) at dori.jasper.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:117) at webreportdemo.ReportManager.generateReport(ReportManager.java:82) at webreportdemo.ReportManager.main(ReportManager.java:146) " Looking forward any ideas from you. Thanks, TranNguyen By: Tran Nguyen - ntbtran RE: Display Unicode with TTC font using JR 2003-04-10 02:37 I already make a test to generate a PDF file (with Japanese characters displayed) using iText library directly (use msgothic.ttc). The test runs well. I dont know why i couldn't do with JasperReport. Any settings need more ? By: Paulo Soares - psoares33 RE: Display Unicode with TTC font using JR 2003-04-10 02:45 I suppose you have mapped the font inside the collection "msgothic.ttc,0". By: Tran Nguyen - ntbtran RE: Display Unicode with TTC font using JR 2003-04-10 19:48 Dear Paulo Soares, thank you very much. I've just tried to do as what you say which i used to think that it might be not a correct syntax (adding "msgothic.ttc,0" in xml report file), but that's great that my problem are solved. Thanx again for your supporting idea, TranNguyen 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