Hi ,
I created a report which generates chinese characters also,my code is
<font fontName="Arial Unicode MS" size="8" pdfEncoding="Cp1250" isPdfEmbedded="true"/>
</textElement>
<textFieldExpression><![CDATA[($F{PCONA_ADDR1}!=null ? $F{PCONA_ADDR1} +"<br>": "") + ($F{PCONA_ADDR2}!=null ? $F{PCONA_ADDR2} +"<br>": "") +
($F{PCONA_ADDR3}!=null ? $F{PCONA_ADDR3}:"")]]></textFieldExpression>
</textField>
It is working fine in ireport internal preview when i export it has PDF format it is not working it is printing like "?????????" instead of chinese characters
how to print chinese charcters and other charcters in PDF.
Thanks in advance
Selva
1 Answer:
I guess you will have to build a font-extension for your Arial-Unicode font and set the pdf-encoding to IDENTITY-H and not to Cp1250 (what is central european... a bit far away from our chinese friends!??! :-) )
Also I'd advice not to adjust the pdf-encoding stuff at each single TextElement level but instead on a default-style report level... otherwise the report is heavy to maintain later.
The font-extension must be within the classpath or your java-application (if you export reports from that and not only from designer)
just see the JasperReports Docus e.g.: https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v640/working-font-extensions
hth + regards
C-Box