We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PDF Merge throwing error?.

Thread ID:

Created:

Updated:

Platform:

Replies:

148414 Oct 18,2019 07:44 AM UTC Nov 5,2019 01:54 AM UTC WinForms 2
loading
Tags: PDF
ios man
Asked On October 18, 2019 07:44 AM UTC

Hello,

we were using 17.1400.0.38, when we do a merge to the multiple pdf document into a single documents, i am getting below error message. the same we were able to do it in 15.1.0.33. we are facing lot of mismatches between 15 and 17 versions. 
when we do merge we were getting below error message.

System.NullReferenceException: Object reference not set to an instance of an object.

   at Syncfusion.Pdf.IO.PdfStructTreeRoot.Add(PdfStructureElement structElement, PdfPageBase page, PdfDictionary annotDictionary)
   at Syncfusion.Pdf.Interactive.PdfFieldCollection.DoAdd(PdfField field)
   at Syncfusion.Pdf.Parsing.PdfLoadedFormFieldCollection.DoAdd(PdfField field)
   at Syncfusion.Pdf.Parsing.PdfLoadedFormFieldCollection.CreateFormFieldsFromWidgets(Int32 startFormFieldIndex)
   at Syncfusion.Pdf.Parsing.PdfLoadedDocument.get_Form()
   at Syncfusion.Pdf.PdfDocumentBase.Append(PdfLoadedDocument ldDoc)
   at Syncfusion.Pdf.PdfDocumentBase.Merge(PdfDocumentBase dest, Object[] sourceDocuments)
   at DocumentConverters.PDFUtility.mergePDFDocuments(String[] pdfdocuments) in  

thanks
iosman

Sowmiya Loganathan [Syncfusion]
Replied On October 21, 2019 01:51 PM UTC

Hi, 

Thank you for contacting Syncfusion support.  

We have checked with the issue which you have mentioned. In older version by default we have perform merge function by clone each and every objects from existing PDF document and dispose it. But effective from product version 17.1.0.32, we did not process the above. The existing PDF document will dispose only after saving of merged PDF document. So as per the provided stack trace we suspect that the issue will occurs due to this. So please set true to “EnableMemoryOptimization” of PDF document.  

Please refer the below KB link to know more about “EnableMemoryOptimization” property, 

Please try the above code snippet in your end and let us know if it solves the issue. If still you have faced the issue, please share us the PDF documents. It will helpful for us to provide the precise solution on this.  

Regards, 
Sowmiya L 



ios man
Replied On November 5, 2019 01:54 AM UTC

Hello,

we were using 17.1400.0.38, when we do a merge to the multiple pdf document into a single documents, i am getting below error message. the same we were able to do it in 15.1.0.33. we are facing lot of mismatches between 15 and 17 versions. 
when we do merge we were getting below error message.

System.NullReferenceException: Object reference not set to an instance of an object.

   at Syncfusion.Pdf.IO.PdfStructTreeRoot.Add(PdfStructureElement structElement, PdfPageBase page, PdfDictionary annotDictionary)
   at Syncfusion.Pdf.Interactive.PdfFieldCollection.DoAdd(PdfField field)
   at Syncfusion.Pdf.Parsing.PdfLoadedFormFieldCollection.DoAdd(PdfField field)
   at Syncfusion.Pdf.Parsing.PdfLoadedFormFieldCollection.CreateFormFieldsFromWidgets(Int32 startFormFieldIndex)
   at Syncfusion.Pdf.Parsing.PdfLoadedDocument.get_Form()
   at Syncfusion.Pdf.PdfDocumentBase.Append(PdfLoadedDocument ldDoc)
   at Syncfusion.Pdf.PdfDocumentBase.Merge(PdfDocumentBase dest, Object[] sourceDocuments)
   at DocumentConverters.PDFUtility.mergePDFDocuments(String[] pdfdocuments) in  

thanks
iosman

thanks, my issue has been fixed ...






CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon