Arabic text is not displaying when exporting pdf using jasper reports 5.6 library

After googling a lot I found somewhere that the arabic text is working in pdf if we set following attribute-:
These attributes can be set in using jasperSoft Studio or by Java code. I have tried both but it throws following error:-
net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font : 
pdfFontName   : Arial
pdfEncoding   : Identity-H
isPdfEmbedded : true
This works fine when I am using Helvetica/Courier/Times-Roman as the pdfFontName. Thus I am suspecting that the libraries are not getting Arial font
wherever it is looking for pdfFontName. Where should I provide the arial font to make it work. Any help will be appreciated.
sanjayjha9950's picture
Joined: Dec 22 2016 - 4:04am
Last seen: 6 years 3 months ago

3 Answers:

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 9 months ago

After all workarounds, i am able to fix this issue in Jasper ireport as follows

In Text Properties of jrxml:

Font Name : Arial

Pdf Font Name : ../arial.ttf

Pdf Embedded : true

Pdf Encoding : Identity-H


In your Project META-INF folder

Create and Add reports folder containing arial.ttf files and font.xml

Outside META-INF folder, add file

So finally, --- Uses --- fonts.xml --- Uses --- true type font files file --> fonts.xml ---> arial.ttf 

The syntactical contents of


<?xml version="1.0" encoding="UTF-8"?>
<fontFamily name="Arial">
</fontFamilies> :




Satish M Hiremath

satishmhiremath's picture
Joined: Sep 29 2016 - 7:06am
Last seen: 5 years 6 months ago

I got Success by using the following steps.

Used Tool to modify the jrxml file : -  IReport Viewer 5.6

Change the Font type to the Arial of the field which is required.

Change the Encoding property of the filed to - Identity-H (Characters which needs more than 25 bits need this like Arabic which the letters are almost images)

That's It,

Image icon Sample from the generated report 81.01 KB
tharindugb's picture
Joined: Nov 2 2020 - 10:20am
Last seen: 2 years 4 months ago