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-3b file with 1 glyph invalid despite having /CIDSet with 0x80 #1462

Open
THausherr opened this issue Jul 12, 2024 · 5 comments
Open

PDF/A-3b file with 1 glyph invalid despite having /CIDSet with 0x80 #1462

THausherr opened this issue Jul 12, 2024 · 5 comments
Assignees
Milestone

Comments

@THausherr
Copy link

THausherr commented Jul 12, 2024

The attached file fails validation
"If the FontDescriptor dictionary of an embedded CID font contains a CIDSet stream, then it shall identify all CIDs which are present in the font program, regardless of whether a CID in the font is referenced or used by the PDF or not"
pdfa3.pdf
The embedded font has 1 glyph with gid 0, and the CIDSet stream has 1 entry in the highest bit, so unless I missed something, this file is OK.

Versions 1.26.2 and 1.27.28

@MaximPlusov
Copy link
Contributor

MaximPlusov commented Jul 16, 2024

@THausherr thanks for reporting this issue!

In this case, veraPDF determines number of сids in the font program based on CIDToGIDMap that contains 5 2-byte values.
image_1

@THausherr
Copy link
Author

The length is the "compressed" length, it's really just one 2 byte value.

I tried generating the same file but with CIDSet and CIDToGIDMap uncompressed and now it validates!
pdfa3_unc.pdf

@MaximPlusov MaximPlusov self-assigned this Jul 16, 2024
@MaximPlusov MaximPlusov added this to the 1.28 milestone Jul 16, 2024
@MaximPlusov
Copy link
Contributor

Thanks. Now I see the mistake we made during parsing of the original file.

To be fixed in one of the nearest dev versions.

@MaximPlusov
Copy link
Contributor

It's fixed in the latest dev version 1.27.33.

@THausherr
Copy link
Author

Thanks, it works!

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

3 participants