Chienese character not displaying correctly in the PDF report

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

while generating report in PDF format using Jasper engine, I get strange character in the output pdf file( Character encoding issue ). It is generating the Chinese characters in HTML and Excel formats properly. To display Chinese character properly in the PDF file I am using  ‘Arial Unicode MS’ as pdfFont and  pdfEncoding as ‘Identity-H (Unicode with horizontal writing)’.I have also tried using font extension as mentioned in the almost all tutorials but nothing seems to be working.Appriciate if someone can provide link to a useful tutorial on this.

Sachin Singh's picture
Joined: May 2 2013 - 11:22pm
Last seen: 9 years 2 months ago

You are only allowed to use the Adobe 14 that come with PDFs

 

Since Jasper doesnt license fonts you would have to make sure you have a proper server liecnse to use fonts outside of print use.

 

To use Arial Unicode or any Microsoft fonts you have to contact Monotype Imaging.It would be an IP infringment of the EULA if you are using these fonts without a liecnse.

 

Jasper only provides open source fonts with limited coverage

 

 

vsicarbon - 8 years 5 months ago

1 Answer:

2. add this jar in 2 places - 
a) webapps-jasperserver-WEBINF-lib (add here) 
b) in Ireport u need to add in classpath. (tools-options-classpath)
3.set font name as "Arial Unicode MS" and keep same property set in ur xml 
 
<font fontName="Arial Unicode MS" size="12" isBold="true" pdfFontName="Arial Unicode MS" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
 
4. restart ur jasperserver.
5. restart ur ireport.
 
jaspersoft123's picture
Joined: Sep 24 2014 - 12:15am
Last seen: 3 years 10 months ago
Feedback
randomness