PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 7:45 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Jan 18, 2018 8:10 am 
Offline

Joined: Wed Oct 19, 2016 9:14 am
Posts: 7
Location: Australia
error throws on PDFSharp.Open; occurs on both beta4 and beta5
System.ArgumentException: Invalid predictor in array
Quote:
at PdfSharp.Pdf.IO.Parser.DecodeCrossReferenceStream(Byte[] bytes, Int32 columns, Int32 predictor)
at PdfSharp.Pdf.IO.Parser.ReadXRefStream(PdfCrossReferenceTable xrefTable)
at PdfSharp.Pdf.IO.Parser.ReadXRefTableAndTrailer(PdfCrossReferenceTable xrefTable)
at PdfSharp.Pdf.IO.Parser.ReadTrailer()
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)
at DocMan.DocQA.CheckSignatureData(String pathtoQAForm, Int32 QAId, String ProjId) in C:\Users\gray\Dropbox\devel\idev\BW_Forms\branches\n3\App_Code\CS\QA\DocQA.cs:line 160


Code:
           try
            {
                PdfDocument pdfQA = PdfReader.Open(pathtoQAForm,PdfDocumentOpenMode.ReadOnly);


Same code works fine on 30+ other almost identical PDFs. In the error case, the file is signed (3 fields) using both Bluebeam & Acrobat, which is unusual for us. (Generally just Bluebeam and all works fine.)
File displays correctly using Bluebeam, Edge, Win10 Reader, Chrome, PDF ExchangeEditor. Form fields (other then signatures) were filled out using PdfSharp library. (had to split to get under 250k)

Not critical as I can update database manually upon the error report.


Attachments:
File comment: part2
QA_16251-01599-002.zip [61.97 KiB]
Downloaded 864 times
File comment: zip file spilt. using 7zip
QA_16251-01599-001.zip [200 KiB]
Downloaded 818 times

_________________
Thanks

Rob
Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 18, 2018 9:30 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
Hi!
I cannot tell whether the file is corrupt or the implementation of PDFsharp is incomplete.
But Adobe Reader shows that there is a problem with a signature:
Attachment:
forum_18-01-18_signature-problem.png
forum_18-01-18_signature-problem.png [ 4.38 KiB | Viewed 12460 times ]


Not my area of expertise. I'll let you know when I get feedback from the experts.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Sun Jan 21, 2018 10:12 pm 
Offline

Joined: Wed Oct 19, 2016 9:14 am
Posts: 7
Location: Australia
Thanks.

Ironically, I suspect it is the signature applied by Adobe Reader that is the problem

R

_________________
Thanks

Rob


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 17, 2020 7:01 pm 
Offline

Joined: Mon Aug 17, 2020 6:39 pm
Posts: 1
Is there any other update to this? The pdf I am using is not signed and getting the same error/call stack when calling XPdfForm.FromStream(). I use the same method with other pdfs without issue.
The pdf version is 1.6 (Acrobat 7.x) and the pdf producer is Bluebeam PDF Library 2017. Some of the other pdfs are at the same version but appear to not match on the same year for the producer. Is there something to be done to target a specific pdf producer?

PDFSharp version is 1.50.5147.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 54 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:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group