PDA

View Full Version : BaseFont.createFont exception when i print unicode.



Anonymous
09-01-2002, 03:03 AM
Hello
I have a exception when i print big5 document, i follow PDFOutputTarget javadoc description "When using unicode characters, you will have to adjust the encoding of this target to "Identity-H", to enable horizontal unicode printing. This will result in larger files. "
I create the PDFOutputTarget and target.setFontEncoding("Identity-H") the error message printed on the console:

WARN: BaseFont.createFont failed.
com.lowagie.text.DocumentException: Identity-H
at com.lowagie.text.pdf.Type1Font.<init>(Unknown Source)
at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
at com.jrefinery.report.targets.PDFOutputTarget.setFont(PDFOutputTarget.
java:672)
at com.jrefinery.report.targets.PDFOutputTarget.open(PDFOutputTarget.jav
a:935)
..........

How to fix the exception in my code ?

Anonymous
09-01-2002, 03:35 AM
Hi,

have you upgraded to the latest cvs version? Unicode printing is buggy in version 0.7.5, but this bug is fixed in the cvs.

Have more fun,
said Thomas