Archive for December, 2008

Exporting PDF using JasperReport in Arabic

Exporting PDF using JasperReport in Arabic

When you try to export PDF file using JasperReport in arabic characters, the characters may not be appeared specially in PDF format.

The key answer of this issue is quite pretty and sample.

In Desktop applications:

1 – Download Arial.ttf font .

2 – Put the Arial.ttf font in your application class path.

3 – From JasperReport designer:- Put your cursor on the properties of the detail in which it will display Arabic characters and select Arial.ttf font from PDF Font name and check isPdf Embedded checkbox and select Arial as a fontName and select “Identity-H as pdfEncoding.

Or you may also replace the font tag in your jrxml at the xml tab source with the following tag :

<font fontName=”Arial” pdfFontName=”ARIAL.TTF” size=”22 isPdfEmbedded =”true” pdfEncoding =”Identity-H”/>

Note: you can change your font size as much as you need.

In web applications :

Attempt almost the same desktop instructions but put your Arial.ttf font in the folder WEB-INF/classes and of course it will be relative to your application.

I hope it will be useful for you all :) .

Good Luck & Best Regards.

4 comments 23 December 2008


Calendar

December 2008
S M T W T F S
« Nov   Jan »
 123456
78910111213
14151617181920
21222324252627
28293031  

Posts by Month

Posts by Category