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 Apr 20, 2024 2:02 am

Hello,

I recently updated SpirePDF and I noticed there is no page.ExtractText() anymore.

Where did it move to? Docs don't appear to be updated, and I'm not finding anything obvious that replaced it.

replaysMike
 
Posts: 13
Joined: Tue Feb 08, 2022 8:43 pm

Sat Apr 20, 2024 2:07 am

...and I found it right after posting.

Code: Select all
var text = page.ExtractText(searchOptions);


is now:

Code: Select all
var extractor = new PdfTextExtractor(page);
var text = extractor.ExtractText(searchOptions);



Probably should update the tutorials to the new interfaces: https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Extract/Read/Extract-Text-from-PDF-Document-using-SimpleTextExtractionStrategy.html

replaysMike
 
Posts: 13
Joined: Tue Feb 08, 2022 8:43 pm

Mon Apr 22, 2024 2:07 am

Hi,

Thanks for your messages.
For the function of extracting text, we have made adjusted to use PdfTextExtractor object to achieve. You can refer to the new help document through the following link:

Code: Select all
https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/How-to-Extract-Text-from-PDF-Document-with-C-/VB.NET.html


For the old method, it has been abandoned and the relevant help document you mentioned will be deleted.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 1010
Joined: Tue Mar 08, 2022 2:02 am

Return to Spire.PDF