PDFsharp & MigraDoc Foundation

PdfSharp.Pdf.IO.PdfReaderException: Unexpected character...
Page 1 of 1

Author:  sheber [ Thu May 16, 2019 4:59 am ]
Post subject:  PdfSharp.Pdf.IO.PdfReaderException: Unexpected character...

I am using PDFsharp library of version 1.50.5147.0.
When i try import some PDF document in the class PdfSharp.Pdf.PdfDocument:
PdfDocument inputDocument = PdfReader.Open("920.pdf", PdfDocumentOpenMode.Import);
error occurs:
Unexpected character '0xffff' in PDF stream. The file may be corrupted. If you think this is a bug in PDFsharp, please send us your PDF file.
в PdfSharp.Internal.ParserDiagnostics.HandleUnexpectedCharacter(Char ch)
в PdfSharp.Pdf.IO.Parser.ReadSymbol(Symbol symbol)
в PdfSharp.Pdf.IO.Parser.ReadObject(PdfObject pdfObject, PdfObjectID objectID, Boolean includeReferences, Boolean fromObjecStream)
в PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider)
в PdfSharp.Pdf.IO.PdfReader.Open(String path, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider provider)
в PdfSharp.Pdf.IO.PdfReader.Open(String path, PdfDocumentOpenMode openmode)

This error is only available for some documents.
Size of tested pdf document is more than 256 kb and not included in this message.
link to download: https://transfiles.ru/x7dlt

is there a solution to this problem?
Please, help me!

P.S. sorry for my english

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group