Reputation: 9581
I have this simple tabular report with many columns with different types .
But when printing the report with rtf (word) extension
the columns with numbers or date appears on the report
.
the columns with with Arabic content appear on the report
.
But when printing the report with PDF extension
the columns with numbers or date appears on the report
.
the columns with with Arabic content DOES NOT appear on the report
.
I have tried many different fonts and changed properties like PDF embed and PDF encoding. What is the right way to do this ?
Upvotes: 3
Views: 13882
Reputation: 1
Finally found this !!! I'm using Jasper 6.17.0
Step 1: Download Arial font from website.
Step 2: Place this ttf file in the server path. eg. /app/jasper/Templates/TemplateFonts/
Step 3: Select text field/static field from the Jasper Design screen, In the Properties > Advanced > PDF provide below
PDF Embedded : true
PDF Encoding : Identity-H (Unicode with horizontal writing)
PDF Font Name : /app/jasper/Templates/TemplateFonts/arial.ttf
Try now :)
Upvotes: 0
Reputation: 1365
I faced similar issue with Arabic text and found above solution helps but it leads to another issues like JVM doesn't have Arial etc. And also we need to configure these properties on each and every field. Following configuration worked for me with the jasper latest versions.
Upvotes: 2
Reputation: 9581
I faced this problem and its very annoying so to make it clear to all here how you do this
on the field or label that may has Arabic content go to its properties by right click or on the properties pallet of it , and make these changes
PDF embed
Identity-H
(Unicode with horizontal writing) from PDF encoding
Arial
if not there add it to the jasper fonts folder in the installation directory
and add it to the class path in settings
Rerun in PDF mode ... it will work
Upvotes: 13