PDF encoding - Not printing characters on export

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

Hello,

I'm having some issues when exporting a report to pdf with Romanian words.

As you can above, when it is on the Jasper Studio preview mode, the characters appear correctly:

However, when exporting to PDF, the characters are not printed at all:

I've searched many other questions and none of the answers solved my problem. Here's what I've tried so far:

  • Change report property: net.sf.jasperreports.export.character.encoding=ISO-8859-1
  • Change pdfEncoding on text field to "Cp1252"
  • Change pdf font name
  • Set pdfEmbeded to true

Can somebody help me on this, please? This is somehow urgent.

Thank you in advance.

Br,
Marques

mmarques6's picture
Joined: Feb 19 2014 - 9:10am
Last seen: 3 years 8 months ago

4 Answers:

You need to use a font that includes glyphs for Romanian characters.  The one used in the article example doesn't.

If you don't have a specific font that you want to use, you can use DejaVu Sans which is bundled in jasperreports-fonts.jar (you can get it from https://sourceforge.net/projects/jasperreports/files/jasperreports/Jaspe...).

Regards,

Lucian

lucianc's picture
43660
Joined: Jul 17 2006 - 1:10am
Last seen: 1 hour 7 sec ago
hozawa's picture
132322
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 3 weeks ago

Thank you for the suggestion hozawa.

I tried setting up font extension (based on that example) and it didn't work:

Do you/somebody have any other suggestion?

Thanks!

 

mmarques6's picture
Joined: Feb 19 2014 - 9:10am
Last seen: 3 years 8 months ago

Thank you so much lucianc!

Changing the font to DejaVu Sans worked!

Br,

Marques

mmarques6's picture
Joined: Feb 19 2014 - 9:10am
Last seen: 3 years 8 months ago
Feedback