EWanner Posted February 16, 2021 Share Posted February 16, 2021 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.We registered a font extension following this postingAnd 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 ANDas 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now