Kurdish text changes after PDF export

0

Hi.

I'm working with JasperStudio v6.1.0 and trying to create reports that have Kurdish text. 

I'm not Kurdish and my Kurdish linguistic knowledge is minor but I'll try to explain the problem:

The text in the Preview is correct but in the exported PDF the text becomes different.

To be more precise, some characters, like ێ are in the Preview written differently, which is OK, but in exported PDF look like that if written alone and look different when are part of a word. 

The text is in static text control like this:

<font fontName="Arial" size="14"/>

The font settings are:

net.sf.jasperreports.default.font.name=Arial
net.sf.jasperreports.default.font.size=10
net.sf.jasperreports.default.pdf.font.name=Arial
net.sf.jasperreports.default.pdf.encoding=Cp1256
net.sf.jasperreports.default.pdf.embedded=false

 For default.pdf.encoding also tryed with Identity-H but without success.

Arial font obtained from the Windows 8.1 PC is embedded in the ...fonts.jar.

Any thoughts?

 

zranisavljevic's picture
Joined: Jul 24 2014 - 3:18am
Last seen: 3 years 10 months ago

4 Answers:

0

Assume font extension has been setup in a proper manner 

Detail

http://community.jaspersoft.com/wiki/custom-font-font-extension

Let's try

net.sf.jasperreports.default.font.name=Arial
net.sf.jasperreports.default.font.size=10
net.sf.jasperreports.default.pdf.font.name=Arial
net.sf.jasperreports.default.pdf.encoding=Identity-H
net.sf.jasperreports.default.pdf.embedded=true

with tag

<font fontName="Airal" pdfFontName="Arial" pdfEncoding="Identity-H" isPdfEmbedded="true"  size="14" />

zol777's picture
58
Joined: Sep 1 2006 - 1:38pm
Last seen: 4 years 1 month ago
0
Tried, but result is the same. Also tried with JasperSoft Studio 6.0.0 which uses itext-pdfa-5.5.0.jar but also result is the same. I'm suspecting that the problem is caused by the fact that Kurdish locale is not supported by Java.
zranisavljevic's picture
Joined: Jul 24 2014 - 3:18am
Last seen: 3 years 10 months ago
0

If locale problem , i think u should first convert all kurd into UTF-8 (sure if locale are not supported in java , may got a problem to convert it via java)

some ref

http://stackoverflow.com/questions/30059890/storing-data-mysql-in-kurdis...

or just simply

String utf8Str = new String(str.getBytes("UTF-8"),"UTF-8");

If it can be converted into UTf-8 encoding, i think should be displayed in a proper manner if those glyph is available

 

zol777's picture
58
Joined: Sep 1 2006 - 1:38pm
Last seen: 4 years 1 month ago
0

Hello.

The text is already UTF-8 and the exported PDF contains all characters but some information needed for proper displaying is missing.

I made this experiment:

Copy not correctly displayed word from the Jasper PDF and paste it in to MS Word.

There it is displayed correctly. 

Then save the Word doc as PDF. Text is also correct.

So, my conclusion that iText exporter is a problem.

zranisavljevic's picture
Joined: Jul 24 2014 - 3:18am
Last seen: 3 years 10 months ago
Feedback
randomness