PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Nov 17, 2019 1:18 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu May 16, 2019 4:59 am 
Offline

Joined: Wed May 15, 2019 11:13 am
Posts: 1
Hello!
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


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 24, 2019 1:41 pm 
Offline

Joined: Thu Oct 24, 2019 1:32 pm
Posts: 1
I am having a similar issue when I try to load existing PDFs to merge I get unexpected character 0xfff in PDF stream. However I can open the documents in Adobe reader and I have also merge these document successfully with other merge tools. Looking at the forum it appears I'm not alone in experiencing this difficulty I'm hoping that someone has a resolution.

unfortunately, the forum doesn't allow me to upload the PDF which is an issue.

Any assistance would be greatly received

Regards



John


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 24, 2019 1:52 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3004
Location: Cologne, Germany
jsm25 wrote:
unfortunately, the forum doesn't allow me to upload the PDF which is an issue.
Small PDFs can be uploaded as ZIP files.
http://forum.pdfsharp.net/viewtopic.php?f=2&t=832

Most likely a corrupt PDF file.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group