Skip to content
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/A-2B difference validation result difference between veraPDF and latest version Adobe PreFlight #1397

Closed
rogerk-apryse opened this issue Dec 14, 2023 · 6 comments

Comments

@rogerk-apryse
Copy link

I tried one version of PreFlight to validate conformance with PDF/A level 2A and I got the same error that VeraPDF shows.

However, this is strange because stepping into the code, I verified that the glyph we used with character code 33 has width 250 in both the PDF font dictionary and in the embedded font file. The PDF font dictionary specified character code 34 has a width of 0 but the we do not use character code 34 in the page content stream anywhere and the PDF/A rule for this applies only to characters that are used and that are rendered with a non invisible text rendering mode.

I used Acrobat Pro version 11.0.23 and it shows the font widths error.
But then I used the newer Acrobat Pro DC version 2015.006.30526 and this one sure enough seems to have fixed the issue and no longer shows the font widths error.

Can you please check if there might be a fix that has to be done to the verification for this issue in veraPDF?

This is the veraPDF error:

"
Rule 6.2.11.5-1
Requirement
For every font embedded in a conforming file and used for rendering, the glyph width information in the font dictionary and in the embedded font program shall be consistent.

root/document[0]/pages[0](11 0 obj PDPage)/contentStream[0]/operators[5]/usedGlyphs[0](AAAAAC+TimesNewRomanPSMT AAAAAC+TimesNewRomanPSMT 33 0 0)
"

Attaching the PDF file and screenshot from PreFlight
271 essai-a.pdf
48df8983-0361-4f7d-a4a0-e2b5a99d9aeb

Thanks
Roger

@bdoubrov
Copy link
Contributor

@rogerk-apryse thanks a lot for raising this issue

First, note that you probably refer to PDF/A-2b, not PDF/A-2a, as the attached PDF document is identified as PDF/A-2b.

The issue with the attached file is that the embedded font in question ((AAAAAC+TimesNewRomanPSMT) is invalid. Its Chatset entry assigns the same glyph name "space" to two different glyphs (GID=1 and GID=2). These two glyphs actually have different widths of 0 and 250. As a result, there is ambiguity in the choice of such glyph, and I guess veraPDF and Acrobat Preflgiht use different logic for glyph selection.

We'll log a warning that embedded font program is incorrect and will also try to adjust our logic for glyph selection in such ambiguous cases to match Acrobat.

@rogerk-apryse
Copy link
Author

Hello and thanks for the good explanation.
Roger

@bdoubrov
Copy link
Contributor

bdoubrov commented Jan 5, 2024

We have added a warning on duplicated glyph names in the embedded font program in the latest dev build of veraPDF

@rogerk-apryse
Copy link
Author

Thanks for the update!
Roger

@bdoubrov
Copy link
Contributor

Added to the latest veraPDF release 1.26

@rogerk-apryse
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants