Skip to content

Read and correct corrupt PDFs with incorrect stream lengths#95

Open
bcallaghan-et wants to merge 3 commits intoempira:masterfrom
Etogy:fix-stream-length
Open

Read and correct corrupt PDFs with incorrect stream lengths#95
bcallaghan-et wants to merge 3 commits intoempira:masterfrom
Etogy:fix-stream-length

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