Jump to content
We've recently updated our Privacy Statement, available here ×

Chinese char not displaying in jasper report pdf


devendragoleit_1

Recommended Posts

Hi,


  I am trying to display Chinese character in jasper report as a pdf file. but it is not diaplaying in pdf format.


Also, i added iTextAsian Jar and font but still i am getting below exception: 



net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font : 

pdfFontName   : Helvetica

pdfEncoding   : Identity-H

isPdfEmbedded : false

 

 

 

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

Hello Team,

I got the solution and issue resolved..

There are following things that we have to change:-

1>  We have to set following property from Java:

  a:         JRProperties.setProperty("net.sf.jasperreports.default.pdf.font.name","ARIALUNI_0.TTF");

  b:        JRProperties.setProperty("net.sf.jasperreports.default.pdf.encoding", "Identity-H");
 
2> We have to remove all the pdffontname tag in JRXML. 
3> Set JPR and JWS encoding property to 'UTF-8'.

 

 

Link to comment
Share on other sites

  • 3 weeks later...

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.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...