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

Read and correct corrupt PDFs with incorrect stream lengths #95

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bcallaghan-et
Copy link

If a stream specifies a length that does not match its actual value, PDFsharp would previously read past the "endstream" marker and fail to parse the rest of the file. This change allows PDFsharp to read the stream properly, even if the length is incorrect. The correct length is then written back into the stream's dictionary. Much of these changes come from @mlaukala who originally wrote the read stream logic.

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

Successfully merging this pull request may close these issues.

2 participants