Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011514Openbravo ERPA. Platformpublic2009-11-26 12:412022-02-01 08:08
franck_routier 
Triage Platform Base 
normalminoralways
acknowledgedopen 
30Professional Appliance
2.50MP8 
 
Core
No
0011514: Unable to generate pdf report unsing Identity-H encoding
When generating pdf reports with encodings other than werstern (cp1252), eg cp1251 for cyrillic, reports in OB fail, as then use a default font that does not contain cyrillic characters, and use a default encoding not suited for those characters.

Issue https://issues.openbravo.com/view.php?id=4139 [^] gives a workaround, than implies modifying the jrxml to set a report-wide font and encoding.

This works as far a you use CP1251, but then you cannot diplay western european texts...

My need is to have invoices that are labelled in both bulgarian (cyrillic) and english (western).

In jasper, this is supposed to be done using the 'Identity-H' (~UTF-8) pdf encoding. But setting a report-wide font with Identity-H encoding results in a blank pdf being generated...
1) In 'Text Interfaces', add a translation for a string in RptC_Invoice.jrxml than contains cyrillic characters.
Print an invoice : the translated sentence is blank.

2) use workaround as in issue 4139, ie add
<reportFont name="Helvetica" isDefault="true" pdfEncoding="CP1251" pdfFontName="/usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf"/> in the jrxml

Print an invoice : translated sentence appears

3) Modifiy the translation to include both cyrillic and western characters
Print an invoice : western characters are not shown...

4) Try to replace CP1251 with Identity-H in the reportFont tag.
Print an invoice : report in blank...
Don't know :-) Maybe related to JasperReports/Itext version ??
OB3-Reviewed
related to design defect 0019325 acknowledged Triage Platform Base i'm using the application in arabic and all pdf and reports doesn't support arabic encoding 
depends on feature request 0004139pi acknowledged iciordia Unicode fonts in iReports 
Not all the children of this issue are yet resolved or closed.
Issue History
2009-11-26 12:41franck_routierNew Issue
2009-11-26 12:41franck_routierAssigned To => rafaroda
2009-11-26 18:55franck_routierNote Added: 0022213
2009-11-30 12:23franck_routierNote Added: 0022254
2009-12-02 11:18rafarodaRelationship addeddepends on 0004139
2009-12-02 12:54shuehnerIssue Monitored: shuehner
2010-02-11 18:26rafarodaAssigned Torafaroda => alostale
2010-02-15 12:55alostaleAssigned Toalostale => adrianromero
2011-06-03 11:00dalsasuaAssigned Toadrianromero => dalsasua
2011-07-20 18:11dalsasuaAssigned Todalsasua => jonalegriaesarte
2011-09-29 11:58psarobeNote Added: 0041368
2011-09-29 11:58psarobeStatusnew => scheduled
2011-11-25 18:03jonalegriaesarteTag Attached: OB3-Reviewed
2012-02-15 19:03iciordiaAssigned Tojonalegriaesarte => vmromanos
2012-02-16 18:17vmromanosAssigned Tovmromanos => alostale
2012-02-17 11:45alostaleRelationship addedrelated to 0019325
2012-02-28 10:37alostaleNote Added: 0045510
2012-02-28 10:37alostaleTypedefect => design defect
2012-02-28 10:37alostaleNote Added: 0045511
2017-03-31 14:36alostaleStatusscheduled => acknowledged
2017-04-10 14:35alostaleAssigned Toalostale => platform
2022-02-01 08:08alostaleAssigned Toplatform => Triage Platform Base

Notes
(0022213)
franck_routier   
2009-11-26 18:55   
When asked if the document should be archived after printing, if I answer yes, I get an error message :

net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font : pdfFontName : Helvetica pdfEncoding : Identity-H isPdfEmbedded : true
(0022254)
franck_routier   
2009-11-30 12:23   
In fact with CP1251, report is also blank if there are some lines in the invoice...
(0041368)
psarobe   
2011-09-29 11:58   
JasperReports has been updated. Needs to be verified
(0045510)
alostale   
2012-02-28 10:37   
Setting as design defect: it must be verified whether it is a jasper reports issue or something incorrectly done in OB platform.
(0045511)
alostale   
2012-02-28 10:37   
See http://forge.openbravo.com/projects/openbravoerp/forum/viewtopic.php?f=549512&t=7026638#p7028414 [^]