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.

Fri Jan 08, 2021 10:59 am

Hello,

I use FreeSpire.PDF with nuget 6.10.6 and when I debug the following code with vs I have a null references exception:

Code: Select all
     PdfDocument pdfDocument = new PdfDocument();
                pdfDocument.LoadFromBytes(pictureData);

                var pdfPage = pdfDocument.Pages[0];
                var images = pdfPage.ExtractImages(); // the exception occurs at this line
                var image = images[0];


Code: Select all
System.NullReferenceException : 'Object reference not set to an instance of an object.'
Stack trace:    at sprᜒ.ᜂ(Stream A_0)


What is strange is when I do not use vs but dotnet watch run no error occurs. Any idea ?

glarreur
 
Posts: 3
Joined: Fri Jan 08, 2021 10:50 am

Mon Jan 11, 2021 2:33 am

Hello,

Thanks for your inquiry and sorry for the late reply as weekend.

I have made a test with FreeSpire.PDF V6.10.6 in both VS2017 and VS2019 but did not reproduce your issue. To help us reproduce the issue, please provide us with your input file, your system information (E.g. Win7, 64 bit) and region setting (E.g. China, Chinese) for reference.

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Fri Jan 15, 2021 8:01 am

Hello,

Hope you are doing well.

How is the issue now? If it still exists, could you please provide your input file, your system information (E.g. Win7, 64 bit) and region setting (E.g. China, Chinese) to us for further investigation?

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Fri Jan 22, 2021 7:39 am

Hello,

Sorry but I have not anymore the file as I have to switch to another method in order to get the picture I want.

However please find my settings :
Vs2019 16.
Windows 10 Pro x64
France, French

Best regards

glarreur
 
Posts: 3
Joined: Fri Jan 08, 2021 10:50 am

Fri Jan 22, 2021 9:32 am

Hello,

Thanks for your feedback.

This error you encountered is mostly related to the data in the document, your file is very important for us to investigate your issue.

In addition, I suggest you use our latest Spire.PDF v7.1, which is much improved in functionality.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Sun Feb 07, 2021 10:02 am

Hello,

Hope you are doing well.

How is the issue now? If it still exists, could you please provide your input file to us for further investigation? You can send it to us via email (support@e-iceblue.com).

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Wed Feb 24, 2021 8:21 am

Hello I am sorry but I do not have this file anymore. If this occurs again with another file I will send it to you.
Best regards

glarreur
 
Posts: 3
Joined: Fri Jan 08, 2021 10:50 am

Wed Feb 24, 2021 10:16 am

Hello,

Thanks for your feedback!

If you encounter any issues related to our product in the future, just feel free to contact us.

Have a nice day!

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.PDF