PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Wed Jun 20, 2018 6:04 am

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: Wed Mar 15, 2017 2:11 pm 

Joined: Wed May 11, 2016 6:19 am
Posts: 4

While opening a file in PDFSharp, we are getting an error saying "Unexpected token 'BOLD' in PDF stream. The file may be corrupted. If you think this is a bug in PDFsharp, please send us your PDF file."

I may not be able to send the file that triggered this error, before some compliance clearance. If someone can at least give me a pointer on what could be wrong or what needs to be checked will be appreciated.

Sai Theodore

Reply with quote  
PostPosted: Wed Mar 15, 2017 3:27 pm 
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2817
Location: Cologne, Germany

Replicate the exception in the debugger using the PDFsharp source code and you will know at which offset of the PDF file the exception occurs.

Are you using PDFsharp 1.50 beta 3b?

How do you know the PDF file is valid?

Thomas Hoevel
PDFsharp Team

Reply with quote  
PostPosted: Mon May 08, 2017 9:08 pm 

Joined: Tue Aug 02, 2016 9:56 am
Posts: 37
Location: Amsterdam, The Netherlands
In addition to what Thomas wrote: if you search for "Unexpected token" on the forum, you may find patches, including a few by me, that fix PDFsharp's parsing of some PDFs. I haven't seen your exact error, but you never know if those patches might help.

(Particularly this one: viewtopic.php?f=3&t=3450 .)

Gerben Vos
Developer, ZyLAB Technologies B.V.

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: Google [Bot] and 5 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