PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
boolean values https://forum.pdfsharp.net/viewtopic.php?f=3&t=2078 |
Page 1 of 1 |
Author: | Ixpah [ Fri Jul 06, 2012 9:11 pm ] |
Post subject: | boolean values |
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. |
Author: | Thomas Hoevel [ Mon Jul 09, 2012 8:42 am ] |
Post subject: | Re: boolean values |
We'll need a sample PDF file to investigate this. |
Author: | Ixpah [ Mon Jul 09, 2012 5:54 pm ] |
Post subject: | Re: boolean values |
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 |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |