Home >Java >javaTutorial >Why Are Cyrillic Values Missing in My Jasper Reports PDF Exports?

Why Are Cyrillic Values Missing in My Jasper Reports PDF Exports?

Barbara Streisand
Barbara StreisandOriginal
2024-11-13 03:07:02392browse

Why Are Cyrillic Values Missing in My Jasper Reports PDF Exports?

Cyrillic Values Not Displaying in PDF Exports from Jasper Reports

Jasper Reports encounters difficulties in displaying cyrillic values when exporting to PDF format. While the values are visible when exported to Excel, they remain invisible in PDF exports.

To resolve this issue, several parameters should be considered:

1. Font Support:

Ensure that the font used to write the cyrillic values is OpenType and capable of rendering these characters.

2. Character Encoding:

Specify the correct character encoding when exporting to PDF using JRPdfExporterParameter.CHARACTER_ENCODING with the value "UTF-8" or "Identity-H". Identity-H is recommended for newer PDF standards and allows for mixed encoding.

3. Font Embedding:

Embed the font in the exported PDF document using JRPdfExporterParameter.IS_EMBEDDED to ensure the content is visible on computers without the font installed.

Additional Considerations:

  • If using iReport or JasperSoft Studio, generate a font extension .jar to include the font in the classpath using the non-deprecated method.
  • Ensure that the .ttf font supports rendering cyrillic characters.
  • Consider using the Identity-H character encoding for optimal compatibility.

The above is the detailed content of Why Are Cyrillic Values Missing in My Jasper Reports PDF Exports?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn