PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Nov 01, 2024 12:01 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
 Post subject: boolean values
PostPosted: Fri Jul 06, 2012 9:11 pm 
Offline

Joined: Fri Jul 06, 2012 8:29 pm
Posts: 4
I'm using code similar to the following to read PDF files:-
using (PdfDocument X = PdfReader.Open(FileName, PdfDocumentOpenMode.ReadOnly))
{
foreach (PdfPage Page in X.Pages)
{
CSequence C1 = default(CSequence);
C1 = PdfSharp.Pdf.Content.ContentReader.ReadContent(Page); // <<- Exception thrown in this method
...
}
}
Up to now I've had no trouble parsing PDF files, but the latest files I need to handle are causing problems. It would appear that the parser isn't seeing false/true as a boolean and is instead seeing them as operators.

Also, at first glance the code to handle arrays in CParser.cs doesn't look like it will populate the array at all.


Top
 Profile  
Reply with quote  
 Post subject: Re: boolean values
PostPosted: Mon Jul 09, 2012 8:42 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3111
Location: Cologne, Germany
We'll need a sample PDF file to investigate this.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
 Post subject: Re: boolean values
PostPosted: Mon Jul 09, 2012 5:54 pm 
Offline

Joined: Fri Jul 06, 2012 8:29 pm
Posts: 4
I'll see what I can do about getting a sample PDF which doesn't contain any sensitive information. They are produced using "PCL2PDF (TM) from Visual Software" and it seems to be these sequences which are causing the problem:-

q 0.12 0 0 -0.12 23.85 264.44 cm
BI /W 1 /H 1 /BPC 1 /F [/AHx] /IM true ID
FF>
EI Q
q 0.12 0 0 -0.12 84.09 264.44 cm
BI /W 1 /H 1 /BPC 1 /F [/AHx] /IM true ID
FF>
EI Q
q 0.12 0 0 -0.12 225.93 393.08 cm
BI /W 1 /H 1 /BPC 1 /F [/AHx] /IM true ID
FF>
EI Q


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 4 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