PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Unexpected character '0xffff' in PDF stream
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3782
Page 1 of 1

Author:  blythgoe [ Tue May 01, 2018 3:31 pm ]
Post subject:  Unexpected character '0xffff' in PDF stream

I'm getting an error when opening a select few of .pdf files:

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)
at PdfSharp.Pdf.IO.PdfReader.Open(String path, PdfDocumentOpenMode openmode)

I was able to open this in Reader and save without issue. The newly saved file caused the same error.

The file causing the error has some slightly confidential information. I will attempt to post here if possible.

Author:  TH-Soft [ Tue May 01, 2018 6:18 pm ]
Post subject:  Re: Unexpected character '0xffff' in PDF stream

blythgoe wrote:
The file causing the error has some slightly confidential information. I will attempt to post here if possible.
You can send it to the developers as written in the error message if it is too confidential for this forum.

Author:  blythgoe [ Tue May 01, 2018 9:06 pm ]
Post subject:  Re: Unexpected character '0xffff' in PDF stream

Thank you for the response. Do they have an e-mail address or some other way to get the file directly to them?

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