You can use the font extension feature that was mentioned in a previous article to achieve the desired result. (http://community.jaspersoft.com/wiki/how-show-cyrillic-letters-pdf)
In case of a custom Java application, you should create a font extension (manually or with iReport/JasperSoft Studio) and place it in the class path of your Java application. It will then be available to your application.
The Images below shows how font extensions can be automatically created in iReport:
Most important configuration lines are in my font extension file (you can find it in the attachments to the article):
<pdfEncoding><![CDATA[Cp1251]]></pdfEncoding> <pdfEmbedded><![CDATA[true]]></pdfEmbedded>
To get the comprehensive information regarding the font extension feature you may want to:
Check the sample, supplied with the JasperReports project distribution package, under the /demo/samples/fonts directory, that shows how to work with font extensions. This sample contains jrxml report, configuration files and ttf fonts that should be embedded to the pdf document.
Read the detailed explanation regarding the font extension (JasperReports Ultimate Guide v3.7 - Page 294 / SIMPLE FONT EXTENSION TUTORIAL)
I have attached to this article a sample of the font extension that was automatically generated by iReport, ttf font and sample of PDF document with the ttf font embedded into it.
Recommended Comments
There are no comments to display.
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