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
Trying to extract text from attached PDF using
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