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

Kurdish text changes after PDF export


zranisavljevic

Recommended Posts

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?

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

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" />

Link to comment
Share on other sites

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-kurdish-font

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

 

Link to comment
Share on other sites

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.

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...