-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PDF/A3-B Export: produces faulty CIDSet #457
Comments
We are currently facing the same problem and cannot solve it. The goal is to generate a PDF/A-3 in order to be Mustang compliant. However, we did not think that it would be such a challenge with Jasperreport. Jasperreport version: 6.21.3 |
I have an odd solution which works for me for now, but I don't know if this will produce any further problems in the future: I created a simple PDF (it is not even a PDF/A3 file) with jasperreports. Then I used the Java Mustang library to load the pdf data into the code because I needed to create XML data for it:
I remember that this code also works for a faulty PDF/A-3 file of jasperreports. Hence, if you run this code with your jasperreports pdf and validate it afterwards, it should be a valid PDF/A-3. Hope this helps. Cheers |
Thank you very much for this solution and the super quick reply! Best regards |
I am using JasperReports to generate PDF/A-3B documents and attempting to validate them with the Mustang library.
However, I encounter the following error: "A CIDSet entry in the Font descriptor does not correctly identify all glyphs present in the embedded font subset."
I am using the following libraries:
Here is the code I use to create pdfs:
The fonts that I'm using are OpenSans fonts. In my
fontsfamily.xml
:In my
jasperreports_extension.properties
:I suspected that there might be an issue with how I embed the font, so here are my attempts:
I have ensured that the fonts are embedded as subsets by using the isPdfEmbedded attribute like this:
<style name="Standard" isDefault="true" pattern="" fontName="OpenSans" fontSize="10" isPdfEmbedded="true"/>
The pdf acrobat reader also shows in the fonts properties that a subset of the font is embedded:
The error also occurs when I omit all text from the .jrxml report template, leaving only the font styles embedded. Here is the example .jrxml template:
I tried out another font as well (DejaVu Sans), to see if OpenSans is the problem but it didn't work either.
Here is an example output file that fails to be validated: output.pdf
Here is my related stackoverflow post.
In order to be PDF/A-3 compliant, one could either remove the CIDSet Stream for PDF/A-3 creations or correct the entry creations for the CIDSet to match the entries from the embedded font.
The text was updated successfully, but these errors were encountered: