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. Image for the cookie policy date
close icon

PDF Merge throwing error

Hi,

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,
Sarath. 

4 Replies

SL Sowmiya Loganathan Syncfusion Team July 9, 2019 01:15 PM UTC

Hi Sarath, 

Greetings from Syncfusion. 

We have analysed the provided stack trace and tried with merging multiple documents sample using v17.1.0.38 in our end. We regret to let you know that we were unable to reproduce the issue. We suspect that the issue to be a document specific. So kindly provide the files which you have used in your end, it will helpful for us to provide the precise solution on this. 

Please let us know if you have any concerns on this. 

Regards, 
Sowmiya L 



SB Sarath Babu Kola July 9, 2019 04:01 PM UTC

attached zip file has the 2 pdf documents , trying to merge and create single document. this is working successfully in version 15 but errored in version 17.

thanks,
Sarath.

Attachment: merge_1c45df8b.zip


SL Sowmiya Loganathan Syncfusion Team July 10, 2019 11:51 AM UTC

Hi Sarath, 

Thank you for the input documents.  

We were able to reproduce the issue with provided documents. We have recently fixed the issue with “NullReferenceException occurs while merging two PDF documents”. We will update the patch by 12th July, 2019.  

Please let us know if you have any concerns on this.  

Regards, 
Sowmiya L 



SL Sowmiya Loganathan Syncfusion Team July 15, 2019 09:10 AM UTC

Hi Sarath, 
 
Thanks for your patience. 
  
The issue with " NullReferenceException occurs while merging two PDF documents" has been resolved already in our latest release 17.2.0.34 and the patch for this fix with mentioned version 17.1.0.38 can be downloaded from the following location.  
  
Recommended approach - exe will perform automatic configuration 
Please find the patch setup from below location: 
  
 
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment 
Please find the patch assemblies alone from below location: 
  
Assembly Version: 17.1.0.38 
  
Installation Directions :  
This patch should replace the files “Syncfusion.Pdf.Base” under the following folder. 
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\4.5.1 
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\17.1.0.38\precompiledassemblies\17.1.0.38\4.0 
  
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies. 
  
Note :  
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode. 
  
  
Disclaimer :  
Please note that we have created this patch for version 17.1.0.38 specifically to resolve the following issue(s) reported in this/the incident(s). 145774  
  
if you have received other patches for the same version for other products, please apply all patches in the order received. 
 
Regards, 
Sowmiya L                                                      
 
 


Loader.
Live Chat Icon For mobile
Up arrow icon