Adding unicode font support to Jasper report generation

Unicode font support can be easily added to Jasper Reports when the report needs to be generated in multiple languages other than English. You might be trying this for long without any success, with every time the unicode characters showing as blank values in the report. I didn’t find any straightforward steps anywhere else on the web.

There are few steps to follow.

1. Open iReport tool and go to Tools > Options.

iReport Jasper Font Installation


2. It will open a new window. Go to Fonts and click on Install New Font

3. It will then display the window as shown below:


4. Browse for the downloaded Unicode font in .ttf format. Select the Arial Unicode font (in my case) and click on Open.

iReport Jasper Font Installation

5. You can select the bold, italic and bold italic versions of the font as well, but make sure the PDF Details section should have the fields marked and selected exactly as shown.

iReport Jasper Font Installation

6. Click on Finish. You can see the following window:

iReport Jasper Font Installation

Click on Export as extension button and save the JAR file at some location on your disk.

7. The final step is to add the saved JAR file to the build path of your application.

This is all. You can now specify the font name to the fields that might contain any Unicode characters.

Following is the example usage in your JRXML file:

Kindly post in your queries/comments/suggestions.

Receive our updates to your inbox

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.