Java – Cyrillic characters are not displayed in Jasper Report PDF

I tried to display Ukranian characters as PDF files in Jasper reports But it is not belittled in PDF format

When I export reports to all other formats like HTML, CSV Ukranian char is displaying

Please help me!

Solution

Set some text field properties in ireport Use the font dejavu sans Set PDF encoding to cp1251 and ispdfembedded to true

For example: < font fontname = "dejavu sans" isstrikethrough = "false" pdfencoding = "cp1251" ispdfembedded = "true" / >

Jasperreports font is Maven dependency:

<dependency>
    <groupId>net.sf.jasperreports</groupId>
    <artifactId>jasperreports-fonts</artifactId>
</dependency>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>