zranisavljevic Posted June 24, 2015 Share Posted June 24, 2015 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=Arialnet.sf.jasperreports.default.font.size=10net.sf.jasperreports.default.pdf.font.name=Arialnet.sf.jasperreports.default.pdf.encoding=Cp1256net.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 More sharing options...
zol777 Posted June 25, 2015 Share Posted June 25, 2015 Assume font extension has been setup in a proper manner Detailhttp://community.jaspersoft.com/wiki/custom-font-font-extensionLet's trynet.sf.jasperreports.default.font.name=Arialnet.sf.jasperreports.default.font.size=10net.sf.jasperreports.default.pdf.font.name=Arialnet.sf.jasperreports.default.pdf.encoding=Identity-Hnet.sf.jasperreports.default.pdf.embedded=truewith tag<font fontName="Airal" pdfFontName="Arial" pdfEncoding="Identity-H" isPdfEmbedded="true" size="14" /> Link to comment Share on other sites More sharing options...
zranisavljevic Posted June 25, 2015 Author Share Posted June 25, 2015 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. Link to comment Share on other sites More sharing options...
zol777 Posted June 26, 2015 Share Posted June 26, 2015 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 refhttp://stackoverflow.com/questions/30059890/storing-data-mysql-in-kurdish-fontor just simplyString 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 More sharing options...
zranisavljevic Posted June 29, 2015 Author Share Posted June 29, 2015 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now