ststeiger / PdfSharpCore

Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)
Other
1.08k stars 237 forks source link

ScanHexadecimalString: IndexOutOfRangeException #345

Open mattprom opened 1 year ago

mattprom commented 1 year ago

I am getting the following exception when trying to open the attached PDF with PdfReader.Open. I am using version 1.3.47.

{System.IndexOutOfRangeException: Index was outside the bounds of the array. at PdfSharpCore.Pdf.IO.Lexer.ScanHexadecimalString() at PdfSharpCore.Pdf.IO.Lexer.ScanNextToken() at PdfSharpCore.Pdf.IO.Parser.ParseObject(Symbol stop) at PdfSharpCore.Pdf.IO.Parser.ReadDictionary(PdfDictionary dict, Boolean includeReferences) at PdfSharpCore.Pdf.IO.Parser.ReadObject(PdfObject pdfObject, PdfObjectID objectID, Boolean includeReferences, Boolean fromObjecStream) at PdfSharpCore.Pdf.IO.PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider, PdfReadAccuracy accuracy) at PdfSharpCore.Pdf.IO.PdfReader.Open(Stream stream, PdfDocumentOpenMode openmode) } Document.pdf