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

EOF problem with file. #822

Open
kingkej opened this issue Apr 23, 2024 · 0 comments
Open

EOF problem with file. #822

kingkej opened this issue Apr 23, 2024 · 0 comments

Comments

@kingkej
Copy link

kingkej commented Apr 23, 2024

Hi everyone! Been using PdfPig for a while now. I really enjoy working with this awesome library. I would like to report an issue I've ran while using it.

Unexpected token following xref and 8637681. We found: %EOF.

at UglyToad.PdfPig.Parser.FileStructure.CrossReferenceTableParser.Parse(ISeekableTokenScanner scanner, Int64 offset, Boolean isLenientParsing)

at UglyToad.PdfPig.Parser.FileStructure.CrossReferenceParser.Parse(IInputBytes bytes, Boolean isLenientParsing, Int64 crossReferenceLocation, Int64 offsetCorrection, IPdfTokenScanner pdfScanner, ISeekableTokenScanner tokenScanner)

at UglyToad.PdfPig.Parser.PdfDocumentFactory.OpenDocument(IInputBytes inputBytes, ISeekableTokenScanner scanner, InternalParsingOptions parsingOptions)

at UglyToad.PdfPig.Parser.PdfDocumentFactory.Open(IInputBytes inputBytes, ParsingOptions options)

at UglyToad.PdfPig.Parser.PdfDocumentFactory.Open(Stream stream, ParsingOptions options)

at UglyToad.PdfPig.PdfDocument.Open(Stream stream, ParsingOptions options)

Firstly, I have tried to remove EOF from byte array of this file, but that made this file unreadable.
Then I have checked this file in VSCode. As you can see there are many EOFs.
After that I have simply deleted last page of this file in PDF Preview and PdfPig managed to open this file. However, PdfSharp library could open this file without any edition.
image
FileData_7.pdf

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

No branches or pull requests

1 participant