PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

Unexpected character '0xffff'
http://forum.pdfsharp.com/viewtopic.php?f=2&t=3950
Page 1 of 1

Author:  blythgoe [ Thu May 02, 2019 8:57 pm ]
Post subject:  Unexpected character '0xffff'

ON a few PDFs I am receiving the error:

Unexpected character '0xffff'

PdfSharp.Pdf.IO.PdfReaderException: 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.
at PdfSharp.Internal.ParserDiagnostics.HandleUnexpectedCharacter(Char ch)
at PdfSharp.Pdf.IO.Parser.ReadSymbol(Symbol symbol)
at PdfSharp.Pdf.IO.Parser.ReadObject(PdfObject pdfObject, PdfObjectID objectID, Boolean includeReferences, Boolean fromObjecStream)
at PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider)
at PdfSharp.Pdf.IO.PdfReader.Open(String path, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider provider)

I have a sample .PDF that causes the error, but I'm unable to attach. I confirmed the behavior on the most recent 'Stable' version of PDFSharp, 1.50.5147.

Author:  blythgoe [ Thu May 02, 2019 8:59 pm ]
Post subject:  Re: Unexpected character '0xffff'

Unable to upload sample PDF due to the following error:

The image file you tried to attach is invalid.

Author:  () => true [ Fri May 03, 2019 7:06 am ]
Post subject:  Re: Unexpected character '0xffff'

blythgoe wrote:
The image file you tried to attach is invalid.
Most likely that's the answer: invalid, corrupt PDF file.
See also:
viewtopic.php?f=2&t=832

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/