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.

Sat Jul 13, 2019 7:16 pm

The attached PDF causes a not an object exception in the following code:

Code: Select all
PdfDocument pdfDocument = new PdfDocument();
StringBuilder strPageText = new StringBuilder();

pdfDocument.LoadFromFile(strSourceFile);
                       
foreach (PdfPageBase page in pdfDocument.Pages)
{
   strPageText.Append(page.ExtractText());
}


The first page is extracted without issue, but the pdfDocument issue has become corrupted by the point of the 2nd loop.

Darren.

DarrenWray
 
Posts: 8
Joined: Mon May 07, 2018 1:40 pm

Mon Jul 15, 2019 2:46 am

Hello Darren,

My apologies for the late response. I want to know which version are you using now. I did a test with an old version and indeed reproduced your issue, but the latest version didn't cause any problems. I suggest you download the latest version Spire.Office Platinum (DLL Only) Version:4.6.3 to try again. If there is any question, please feel free to write back.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Wed Jul 17, 2019 9:36 am

Hello Darren,

Greetings from E-iceblue.
Have you tested the latest version? Could you please give us some feedback at your convenience?

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.PDF