How to display Japanese fonts in PDF via Jasper Reports (without embedding fonts)?

I create a report with Japanese characters and the characters are displayed correctly in iReport, but when using the PDF exporter, Japanese characters are invisible.

I just want to use the MS Mincho font in a PDF report or a standard Japanese PDF font, but I don’t know how to configure it. I know that there is a similar question about stack overflow, but the answers to this question are unconvincing and do not work.

I am using iText 3.7.3 and Jasper Reports 3.7.3 with iText 2.1.7 as a PDF export library. Earlier versions of Jasper were used to use iTextAsian.jar to export Japanese fonts, but this is no longer the case. Does anyone have any know-how on how to get Japanese PDF files working with the new version?

Thanks,

+4
source share
1 answer

If you want to use the built-in font of the PDF reader, be sure to specify the correct PDF Font name and PDF Encoding in the report element (see the answer for Japanese fonts that are not visible in pdf export in iReports )

In this case, the MS Mincho font is used only to calculate the actual height / weight when rendering the report.

You can copy iTextAsian.jar from the old version, do not forget to add it to the classpath.

0
source

Source: https://habr.com/ru/post/1316052/


All Articles