issue with reginal language in PDF in java spring web application

I have different issue. when I run my pdf report having "Marathi" language unicode characters through JasperReport tool, it runs just fine. When I run it through java code, although after applying fonts extension, characters are not showing properly. characters having joints are not showing up properly although they are saved properly in DB (MySql) and displaying well as expected in jsp/html. e.g. "पर्वती रॉ वॉटर" (correct one) getting displayed as "पर् वती रॉ वॉटर" (incorrect, ignore space that I included as this message html converting it to right ) in PDF from java. Will you please help me here. This is killing me for days now.

rupali.koshti's picture
Joined: Jun 22 2016 - 3:07am
Last seen: 6 years 11 months ago

Thanks for reply,


but it's doesn't work .
 
I uesd maven dependancy of jasperreports 6.2.0 in my maven+spring web application :
 
 <dependency>
    <groupId>net.sf.jasperreports</groupId>
    <artifactId>jasperreports</artifactId>
    <version>6.2.0</version>
</dependency>
 
I have attached jrxml file and it's font extension with Identity-H PDF encoding. I am using Arial Unicode MS font. for that I am using .ttf file of arialUnicodeMS but also it's does not work.
 
I wants to access it with my java spring web application, marathi language in pdf is not showing properly.
 please, reply urgently.

 

rupali.koshti - 6 years 11 months ago

7 Answers:

ok.

  'रजेचे रजिस्टर'    (correct one ) but in pdf when creating through java code it look like this.

rupali.koshti's picture
Joined: Jun 22 2016 - 3:07am
Last seen: 6 years 11 months ago

If you are using JasperReports 6.2.0 or newer and a font extension with Identity-H PDF encoding, it should work fine.  If it doesn't please attach the JRXML and the font extension that you are using.

Regards,

Lucian

lucianc's picture
77102
Joined: Jul 17 2006 - 1:10am
Last seen: 13 hours 54 min ago

Thanks for reply,


but it's doesn't work .
 
I uesd maven dependancy of jasperreports 6.2.0 in my maven+spring web application :
 
 <dependency>
    <groupId>net.sf.jasperreports</groupId>
    <artifactId>jasperreports</artifactId>
    <version>6.2.0</version>
</dependency>
 
I have attached jrxml file and it's font extension with Identity-H PDF encoding. I am using Arial Unicode MS font. for that I am using .ttf file of arialUnicodeMS but also it's does not work.
 
I wants to access it with my java spring web application, marathi language in pdf is not showing properly.
 please, reply urgently.
 

 

rupali.koshti's picture
Joined: Jun 22 2016 - 3:07am
Last seen: 6 years 11 months ago

I made a test with Arial Unicode MS in 6.2.0 and "पर्वती रॉ वॉटर" was displayed properly in PDF, see attached screenshot.

Reproducing the problem that you are seeing requires a detailed (and self contained) test case.

Regards,

Lucian

Attachments: 
AttachmentSize
Image icon screen_shot_2016-06-29_at_13.57.00.png204.17 KB
lucianc's picture
77102
Joined: Jul 17 2006 - 1:10am
Last seen: 13 hours 54 min ago

thanks Lucian,

I think you are giving me screenshot of TIBCO Jaspersoft studio export to pdf file.it is working correctly in designer studio.

But, when I export jrxml file through java code  :

printFile = JasperFillManager.fillReportToFile(sourceFile, parametersMap,connectionForJasper);

JasperExportManager.exportReportToPdfFile(printFile,pdfFile);

"पर्वती रॉ वॉटर" (correct one) getting displayed as "पर् वती रॉ वॉटर" .

In Java spring + maven using dependancy of 

<dependency>
    <groupId>net.sf.jasperreports</groupId>
    <artifactId>jasperreports</artifactId>
    <version>6.2.0</version>
</dependency>
 
Plz, give me solution when using through Java code.
 

 

 

rupali.koshti's picture
Joined: Jun 22 2016 - 3:07am
Last seen: 6 years 11 months ago

Can you attach a PDF file that shows the problem?

lucianc's picture
77102
Joined: Jul 17 2006 - 1:10am
Last seen: 13 hours 54 min ago

Can you please attach a PDF file (not screenshot).

lucianc's picture
77102
Joined: Jul 17 2006 - 1:10am
Last seen: 13 hours 54 min ago
Feedback