IReport + UTF-8

I have some utf-8 characters in a jasperreports template. Everything is fine in the iReport editor. But after compilation, PDf output cannot draw valid Unicode characters and pictures? instead of this.

How can i fix this? Thanks you

+7
source share
2 answers

To enable Unicode support in the output PDF, you need to:

  • Add jasperreports-fonts-xxxjar to run the project class
  • In iReport, select an external font for text fields and static text elements. These are usually DejaVu fonts.

This solution is for the latest versions of JasperReports (tested on 4.5.0)

+8
source

If you are having trouble displaying UTF-8 characters in pdf, you don’t need to do anything! Just change the font of the cell in the table from sanserif to Dejavu sans. It is he.

0
source

All Articles