PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Mar 19, 2024 4:45 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Thu Sep 29, 2016 12:50 am 
Offline

Joined: Mon Jul 04, 2016 4:00 am
Posts: 2
Hi,

I have a file upload form that users use to upload pdfs.
Pdf sharp date stamps the pdfs that are uploaded.
It seems to work for most pdfs but it seems that a few users receive an error.
In the logs I get the following:

System.NullReferenceException: Object reference not set to an instance of an object. at PdfSharp.Pdf.PdfPages.GetKids(PdfReference iref, InheritedValues values, PdfDictionary parent...

I am using PDFsharp-1_50-beta3b.
Any suggestions on what may be causing this error?

Kind regards,
Chris


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 29, 2016 8:11 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3092
Location: Cologne, Germany
Hi!
chrisc wrote:
Any suggestions on what may be causing this error?
Sounds like a known issue that was not resolved yet.
I don't know whether or not the files are valid, but we shall try to support them with PDFsharp.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Dec 08, 2016 11:15 am 
Offline

Joined: Thu Dec 08, 2016 11:10 am
Posts: 1
Hi, i have the same issue with some pdf files,
Could i email you a pdf to check what is the problem.

Thanks in advance.


Top
 Profile  
Reply with quote  
PostPosted: Thu Dec 08, 2016 1:52 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3092
Location: Cologne, Germany
Hi!
I sent you a PM with our e-mail address for file submissions.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 12, 2018 1:49 pm 
Offline

Joined: Thu Nov 09, 2017 2:03 pm
Posts: 2
Is there any news on this issue? I'm experiencing the same exception, but since the files are confidential, I can't share them, unfortunately.

Thanks in advance.

My stack trace is:
Code:
at PdfSharp.Pdf.PdfPages.GetKids(PdfReference iref, InheritedValues values, PdfDictionary parent)
at PdfSharp.Pdf.PdfPages.FlattenPageTree()
at PdfSharp.Pdf.Advanced.PdfCatalog.get_Pages()
at PdfSharp.Pdf.PdfDocument.get_Pages()
...


I've tried PDFsharp.1.50.4000-beta3b and PDFsharp-MigraDoc.1.50.4790-beta5a with same result.

EDIT: I have attached some output from veraPDF (it's probably not supposed to be a PDF/A file, but it still might give you some hints). Sorry for hijacking the thread if it's a different issue.


Attachments:
htmlReport.zip [11.76 KiB]
Downloaded 307 times
Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 13, 2018 9:42 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3092
Location: Cologne, Germany
PDFsharp 1.50 was not optimized for the handling of corrupt PDF files.

There are some pull requests on GitHub that improve dealing with corrupt PDF files. Maybe one of them helps with the Kid problem.
The pull requests will be included in future versions of PDFsharp.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 25 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