Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iReport + UTF-8

I have some utf-8 characters in jasperreports template. In iReport editor everything fine. But after compiling the output PDf can not draw the valid unicode characters and draws ? instead.

How can I fix it? Thank you

like image 254
nKognito Avatar asked Feb 09 '12 14:02

nKognito


1 Answers

In order to enable unicode support in output PDF file you have to:

  1. Add jasperreports-fonts-x.x.x.jar to project's classpath
  2. In iReport select external font for textboxes and static text elements. Usually, it is DejaVu fonts

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

like image 133
nKognito Avatar answered Oct 05 '22 11:10

nKognito