Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Mon Apr 30, 2018 10:53 am

While merging the specific PDF file, it is throwing below error :

"Object reference not set to an instance of an object".

Full stack trace of the error is as below :

at Spire.Pdf.PdfDocumentBase.?(spr? A_0)
at Spire.Pdf.Bookmarks.PdfBookmarkWidget.?()
at Spire.Pdf.Bookmarks.PdfBookmarkWidget.get_Destination()
at Spire.Pdf.PdfDocumentBase.?()
at Spire.Pdf.PdfDocumentBase.ImportPageRange(PdfDocumentBase ldDoc, Int32 startIndex, Int32 endIndex)
at Spire.Pdf.PdfDocumentBase.?(PdfDocumentBase A_0)
at Spire.Pdf.PdfDocument.AppendPage(PdfDocument doc)

Currently I am using the Spire PDF Version 3.9.360.2040.

Also I have tried the latest version of Spire PDF 4.4.6.2040 by downloading it from NuGet Package manager console. It is also throwing same error.

Awaiting for the positive response from your side.

vasayarizwan
 
Posts: 2
Joined: Mon Apr 30, 2018 10:33 am

Tue May 01, 2018 3:42 am

Hello,

Thanks for your inquiry.
At present, the latest version is Spire.Pdf 4.4.11, you could upgrade to this one to test again. If the issue still happens, we need your input files for testing. You could send them to us via email [email protected].

Thanks and Regards
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Thu May 03, 2018 6:59 am

Hello,

Greetings from E-iceblue.
Could you please let us know how is the latest version worked? Thanks in advance for your valuable feedback and time.

Thanks and Regards
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Tue May 08, 2018 9:12 am

Hi,

As per your suggestion I have tried with the latest Spire.Pdf 4.4.11 to merge the file. But unfortunately it is not working and throwing error "Object reference not set to an instance of an object.".

As per our companies policy, I am not able to share file with you. Is there any other way you can assist me to resolve the issue ?

Moreover, Issue is coming only for few PDF files. For others it is working fine.
Another thing I notice is that during debugging, If we wait for few seconds by keeping debugger at merging code and then press f5 it is working.

This issue is coming only in release mode. In debugging mode after waiting few seconds then it is working fine.

I hope you understand the situation.

vasayarizwan
 
Posts: 2
Joined: Mon Apr 30, 2018 10:33 am

Tue May 08, 2018 9:50 am

Dear,

Thanks for your feedback.
It is hard to locate the cause of your issue without your original Pdf files. Hence, we need your files to do further investigation. Don't worry, we promise to keep your documents confidential and won't use them for any other purpose, also you could remove the security data of your documents and then send them to us via email ( [email protected] ). Besides, please also share your testing environment, such as Windows 7 64-bit, China/Chinese. In addidtion, did you try merging Pdf files with new method? Did the problem still exist?

Thanks and Regards
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Thu May 10, 2018 3:59 am

Dear

Has your issue been fixed? Any feedback will be greatly appreciated.
Wish you a nice day!

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Wed Jun 26, 2019 9:46 pm

Hi - I'm getting the error trying to extract an attachment from an encrypted PDF. I'm using the version 5.6.31.2046

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

Module Module1
Sub Main()
Dim doc As Spire.Pdf.PdfDocument = New Spire.Pdf.PdfDocument()

'Here Attachment property has an error
doc.LoadFromFile("C:\Users\USER\Desktop\NP Project\[ENCRYPTED] attachments.pdf", "Zppp0000#")

Dim data As Byte()
Dim Excel_Path As String

Excel_Path = "C:\Users\USER\Desktop\NP Project\NP.xls"

'Only has one attachment
data = doc.Attachments(0).Data

If (System.IO.File.Exists(Excel_Path)) Then 'Excel_Path & doc.Attachments(index).FileName.Replace(" ", ""))) Then
System.IO.File.Delete(Excel_Path) ' & doc.Attachments(index).FileName.Replace(" ", ""))
End If

System.IO.File.WriteAllBytes(Excel_Path, data) ' & doc.Attachments(index).FileName.Replace(" ", ""), data)

doc.Close()
End Sub

End Module

GDuranR
 
Posts: 3
Joined: Mon Oct 29, 2018 5:21 pm

Thu Jun 27, 2019 7:12 am

Hi,

Thanks for your inquiry.
I have reproduced your issue and logged it into our bug tracking system for further investigating. If there is any update, we will inform you. Sorry for the inconvenience caused.

Sincerely,
Nancy
E-iceblue support team
User avatar

nancy.yang
 
Posts: 184
Joined: Wed Apr 03, 2019 2:33 am

Tue Jul 02, 2019 9:59 pm

Hi - Do you have news about this case?
I will really appreciate your support...

GDuranR
 
Posts: 3
Joined: Mon Oct 29, 2018 5:21 pm

Wed Jul 03, 2019 4:00 am

Hello GDuranR,

Thank you for following up.
I got the news from our Dev team that the reported issue has not been resolved completely, they are still working on it. Once it is fixed, we will let you know immediately. Thanks for your patience.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Mon Jul 15, 2019 3:25 pm

Thanks a lot for your support. Really appreciate it.

GDuranR
 
Posts: 3
Joined: Mon Oct 29, 2018 5:21 pm

Mon Jul 06, 2020 11:47 am

Hello GDuranR,

Thanks for your patient waiting.
Glad to inform that your issue has been resolved, please download the newly released Spire.PDF Pack(Hot Fix) Version:6.7.2 and test.
Our website: https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
Nuget: https://www.nuget.org/packages/Spire.PDF/6.7.2

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF

cron