Jump to content
We've recently updated our Privacy Statement, available here ×

PDF encoding - Not printing characters on export


mmarques6
Go to solution Solved by lucianc,

Recommended Posts

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:

preview(4).PNG.f11ec11ba00347620068b6d6a17dd179.PNG

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

print(1).PNG.dea37b9ee0d358dd26e0f76aedd60409.PNG

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

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Solution

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/JasperReports%206.3.0/).

Regards,

Lucian

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...