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

Added big generation value parsing #257

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

maxpowel
Copy link
Contributor

Hello,

In the XREF section, with generation values greater than 65535 (2¹⁶) the parsing process fails because it expects u16 but the value does not fit. This is very unlikely to happen but I found many PDF generated with this poblem (I attach one example).
In all cases, just ignoring these entries was a valid solution and this is why I just changed the process at parsing level allowing u32 and then converting it to u16 so everything else runs as before.

With this simple change the library is a little more robust by not failing at these weird cases.

DOC2018082312575338+18+INFORME+NECESIDAD.pdf

@J-F-Liu J-F-Liu merged commit 9f43156 into J-F-Liu:master Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants