Jasper レポートを PDF にエクスポートするとキリル文字が破損するのはなぜですか?
Troubleshooting Cyrillic Character Export Issues in Jasper Reports
Jasper Reports encounters challenges displaying Cyrillic values when exported to PDF format. While they appear correctly when exported as Excel, the text is corrupted in PDF. This issue stems from the underlying iText library utilized by Jasper Reports.
iText Character Rendering Considerations
To address this problem, consider the following steps:
- Ensure Font Compatibility: Verify that the TrueType Font (TTF) used supports Cyrillic characters and can render them properly in PDF format.
- Use Correct Encoding: Pass the correct encoding parameter to iText. For comprehensive compatibility, use "Identity-H" encoding, which allows for the inclusion of various character encodings.
- Embed the Font: Ensure that the font is embedded in the PDF document to allow viewing on systems that may not have the font installed locally.
JasperReport Configuration
To implement these changes in Jasper Reports:
-
Deprecated Method: (deprecated in Jasper Reports versions 3 and above)
- Define font attributes in the text element:
<textElement> <font pdfFontName="Helvetica" pdfEncoding="Identity-H" isPdfEmbedded="true"/> <paragraph lineSpacing="Single"/> </textElement>
ログイン後にコピー -
Recommended Method: (for versions 3 and above)
- Utilize Font Extensions: Generate a .jar file of your font extension using tools like iReport or JasperSoft Studio. Include this .jar file in your classpath.
By addressing these considerations, you can resolve the issue of missing Cyrillic values when exporting Jasper Reports to PDF format.
以上がJasper レポートを PDF にエクスポートするとキリル文字が破損するのはなぜですか?の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック







