manolov.petar Posted June 27, 2017 Share Posted June 27, 2017 Using jasper reports version 1.3 to make pdf reports. Struggle producing a report in japanese. The font used is Code2000.ttfThe font is defined as follows in .jrxml file:<reportFont name="font-normal" isDefault="true" fontName="Code2000" size="9" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="CODE2000.TTF" pdfEncoding="UTF-8" isPdfEmbedded="true"/><reportFont name="font-bold" isDefault="false" fontName="Code2000" size="9" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="CODE2000.TTF" pdfEncoding="UTF-8" isPdfEmbedded="true"/>[/code]Part of the report below:Using UTF-8, the font is shown as embedded in the pdf file, however the encoding is shown as custom. We also tried using Identity-H encoding for this font, but got java.io.UnsupportedEncodingException: Identity-H. We tried with HeiseiKakuGo-W5 font with UTF-8 encoding with the same result.We would appreciate any help resolving this. Link to comment Share on other sites More sharing options...
Friendly User Posted June 27, 2017 Share Posted June 27, 2017 Hello,newer JasperReports are using font extensions to correctly embed the fonts inside the PDF. However, since you use Jasper 1.3, you'll need to make sure that the pdfFontName and pdfEncoding are correct. In your case it looks like pdfFontName but for PDF encoding you may want to try Identity-H instead of UTF-8.If that doesn't still work, right click anywhere in generated PDF, go to Document Properties -> Fonts. Do you see your font embedded there? If not, there may be also an issue with font not available to JasperReports during the report compilation. 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