Question: We are using special characters in our JRXML report. When we exported this report into PDF format, it was not showing in PDF. How do I resolve this issue?
Answer: To print the special character in the pdf file, you have to use the font extension for the specific font. We are using here the Romanian font,AbhayaLibre-Regular. Please refer to the below steps for more details:
1) Download the provided ttf file from the case attachments (AbhayaLibre-Regular.zip). You have to use this ttf file for that respective font.
2) Go to Windows -->Preferences --> Jaspersoft Studio -->Fonts. You have to add this ttf file over here to use the font. Click on Add and make the required settings. Please refer to the attached screenshot (Adding_the_ttf_file.png) to make those required settings.
3) Make sure that you are using this font for that respective field.
4) Go to Windows --> Preferences --> Jaspersoft Studio --> Fonts. Select the font and click on export. So it generates .jar file for that font.
5) Import this font jar into the class path within the libraries in the jrxml report of the respective project. Please refer to the attached screenshot (import_font_in_classpath.png) for more details.
6) Place this jar inside the WEB-INF/lib directory.
7) Restart the server.
8) Save the JRXML report. Preview it in studio. Make the studio export. You can see that special character in that pdf file.
9) Publish this JRXML report to the JRS.
10) When you export this report in pdf format from the server, you can see special characters in the pdf export over the server as well.
Please refer to the below article for more details about using the font extension:
https://community.jaspersoft.com/knowledgebase/best-practices/custom-font-font-extension/
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