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

The cross references formed an infinite loop: PdfDocumentFormatException #959

Open
cengizemre opened this issue Dec 25, 2024 · 0 comments
Open

Comments

@cengizemre
Copy link

Hello,

This attached PDF throws UglyToad.PdfPig.Core.PdfDocumentFormatException exception. PdfDocument can't open this PDF.

Code:

using PdfDocument document = PdfDocument.Open(bytes, new ParsingOptions
{
    SkipMissingFonts = true,
    UseLenientParsing = true
});

Details:

This exception was originally thrown at this call stack:
    UglyToad.PdfPig.Parser.FileStructure.CrossReferenceParser.Parse(UglyToad.PdfPig.Core.IInputBytes, bool, long, long, UglyToad.PdfPig.Tokenization.Scanner.IPdfTokenScanner, UglyToad.PdfPig.Tokenization.Scanner.ISeekableTokenScanner)
    UglyToad.PdfPig.Parser.PdfDocumentFactory.OpenDocument(UglyToad.PdfPig.Core.IInputBytes, UglyToad.PdfPig.Tokenization.Scanner.ISeekableTokenScanner, UglyToad.PdfPig.ParsingOptions)
    UglyToad.PdfPig.Parser.PdfDocumentFactory.Open(UglyToad.PdfPig.Core.IInputBytes, UglyToad.PdfPig.ParsingOptions)
    UglyToad.PdfPig.Parser.PdfDocumentFactory.Open(byte[], UglyToad.PdfPig.ParsingOptions)
    UglyToad.PdfPig.PdfDocument.Open(byte[], UglyToad.PdfPig.ParsingOptions)

Thank you.

PDF File: algo.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