Skip to content

Could not find the startxref within the last 2048 characters reading pdf #958

@kobruleht

Description

@kobruleht

Trying to extract text from attached PDF using

UglyToad.PdfPig.PdfDocument.Open(pdfStream, new UglyToad.PdfPig.ParsingOptions() { SkipMissingFonts = true });

throws exception

Meetod GetStartXrefPosition
UglyToad.PdfPig.Core.PdfDocumentFormatException: Could not find the startxref within the last 2048 characters.
at UglyToad.PdfPig.Parser.FileStructure.FileTrailerParser.GetStartXrefPosition(IInputBytes bytes, Int32 offsetFromEnd)
at UglyToad.PdfPig.Parser.FileStructure.FileTrailerParser.GetFirstCrossReferenceOffset(IInputBytes bytes, ISeekableTokenScanner scanner, Boolean isLenientParsing)
at UglyToad.PdfPig.Parser.PdfDocumentFactory.OpenDocument(IInputBytes inputBytes, ISeekableTokenScanner scanner, ParsingOptions 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)
Could not find the startxref within the last 2048 characters.pdf

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions