PDF encoding - Not printing characters on export

0

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: 1 year 1 week ago

4 Answers:

1

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
7146
Joined: Jul 17 2006 - 1:10am
Last seen: 5 min 48 sec ago
0
hozawa's picture
53192
Joined: Apr 24 2010 - 4:31pm
Last seen: 5 months 1 week ago
0

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: 1 year 1 week ago
0

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: 1 year 1 week ago
Feedback