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

How to export a report to PDF/A with logical JVM font?


EWanner

Recommended Posts

In our project we use the Jasper class 'JRPdfExporter' to export a generated Jasper report to PDF/A successfully. The most critical thing was to embed the font. We followed the recommended instruction in this answer posting.

  1. We registered a font extension following this posting
  2. And configured the "fonts.xml" file to use the font we use in the report.

This way works well, because we use a physical font (for example "Arial" or "Arial Unicode MS" or another):

  • in report design AND
  • as registed font for PDF/A export.

If we switch to one to the 5 logical JVM fonts (see Oracle documentation, referenced also on this answer posting) like "Dialog", then the 'JRPdfExporter' fails with an error message:

net.sf.jasperreports.exception.export.pdf.font.loading.error=Could not load the following font: npdfFontName: {0}npdfEncoding: {1}nisPdfEmbedded : {2}[/code]

The root cause is very clear: the PDF-exportert tries to find an physical font "Dialog", that does not exist.

My questions are:

  • Is is possible to export a Jasper report to PDF/A using logical JVM fonts?
  • If no, we have to live with this restriction?
  • If yes, can sou please give me an instruction "How to do"?

Thanks,
Edmund

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...