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 Mar 12, 2021 3:50 am

I install Spire.pdf 7.3.1 from nuget:
This my code:
Code: Select all
 Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument();
            doc.LoadFromFile("test1.pdf");
            PdfPageBase page = doc.Pages[0];
            Spire.Pdf.Exporting.Text. SimpleTextExtractionStrategy sta = new Spire.Pdf.Exporting.Text.SimpleTextExtractionStrategy();
            string text = page.ExtractText(sta);


Occur Exception: "Object reference not set to an instance of an object."
Code: Select all
 at sprᷥ.ᜐ(sprᥲ A_0)
   at sprᷥ.ᜈ()
   at sprᷧ.ᜀ(sprᥳ A_0, sprᝮ A_1)
   at sprᷧ.ᜀ()
   at sprᷧ..ctor(PdfPageBase A_0, sprᷡ A_1, Boolean A_2)
   at sprᷠ.ᜁ(PdfPageBase A_0)
   at sprᣛ.ᜀ(PdfPageBase A_0, Boolean A_1, RectangleF A_2)
   at Spire.Pdf.PdfPageBase.ExtractText(RectangleF rectangleF, SimpleTextExtractionStrategy sim)
   at Spire.Pdf.PdfPageBase.ExtractText(SimpleTextExtractionStrategy strategy)


Data test: https://drive.google.com/file/d/1C0eI-l8un79yYf-SNtBteVobKjhSv-1O/view?usp=sharing

daitranthanhhoa
 
Posts: 51
Joined: Mon Sep 19, 2016 3:04 am

Fri Mar 12, 2021 7:28 am

Hello,

Thanks for your inquiry.
I have reproduced your issue and logged it in our bug tracking system with the ticket SPIREPDF-4097.
Sorry for the inconvenience caused. I will inform you once it is solved.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3044
Joined: Wed Jun 27, 2012 8:50 am

Thu Mar 18, 2021 2:39 am

:?:

daitranthanhhoa
 
Posts: 51
Joined: Mon Sep 19, 2016 3:04 am

Thu Mar 18, 2021 2:57 am

Hello,

Our developer just fixed SPIREPDF-4097 issue, next, we will build a new version to test the fix. Once new version is released, I will inform you.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3044
Joined: Wed Jun 27, 2012 8:50 am

Fri Mar 26, 2021 8:55 am

:(

daitranthanhhoa
 
Posts: 51
Joined: Mon Sep 19, 2016 3:04 am

Mon Mar 29, 2021 6:55 am

Hi,

It will take a while for the official version to be released as it contains a number of fixes and feature updates that require more time for verification. But I can provide you with a temporary version soon. Do you need it?

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3044
Joined: Wed Jun 27, 2012 8:50 am

Tue Mar 30, 2021 1:32 am

Yes, Please send.
Thank you.

daitranthanhhoa
 
Posts: 51
Joined: Mon Sep 19, 2016 3:04 am

Tue Mar 30, 2021 2:03 am

Hi,

Please download the temporary version for testing first . When the official version is released, we will inform you.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3044
Joined: Wed Jun 27, 2012 8:50 am

Fri Apr 02, 2021 4:44 am

Hi some case can't extract text:
Data test: https://drive.google.com/file/d/1a414Qd ... sp=sharing

daitranthanhhoa
 
Posts: 51
Joined: Mon Sep 19, 2016 3:04 am

Fri Apr 02, 2021 6:22 am

Hello,

Thanks for your feedback.
Regarding the new file you provided, after analyzing, I found that the text property of your PDF file is “path” but not “text”, you could use a PDF editor tool like Foxit PDF Editor to verify this. Thus, no text could be extracted. Even using Adobe to extract, there is a same result. Hope you can understand.
If there are any other questions, please feel free to contact us.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Fri Apr 02, 2021 6:34 am

I using Acrobat , It can edit text.

daitranthanhhoa
 
Posts: 51
Joined: Mon Sep 19, 2016 3:04 am

Fri Apr 02, 2021 8:14 am

Hello,

Thanks for your reply.
When opening your PDF under the view mode (not edit mode) in Adobe, you will find that you cannot select any content. Meanwhile, if you press “Ctrl+F” to search the text, you will get the message “This is a scanned PDF and cannot be searched”.
FindTextInAdobe.png


The mechanism of Adobe's edit mode and view mode is different. For the edit mode, Adobe is supposed to use OCR technology to convert the scanned page into editable text and images, so you can edit the text. But in edit mode, if you copy the content directly and then paste it to a TXT file, you will get garbled characters (as shown below). This also indicates that the actual content of your PDF text cannot be extracted. You can verify it on your side.
copyContent.png


Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Fri Apr 02, 2021 8:35 am

OK, Thank you.

daitranthanhhoa
 
Posts: 51
Joined: Mon Sep 19, 2016 3:04 am

Fri Apr 02, 2021 9:38 am

You are welcome.
If there are any other questions related to our products, just feel free to contact us.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Wed Apr 14, 2021 10:22 am

Hello,

Thanks for your patience!

Glad to inform you that we just released Spire.PDF Pack(Hot Fix) Version:7.4.5 which fixes the issue SPIREPDF-4097.

Please download the fix version from the following links to test.
Website link:
https://www.e-iceblue.com/Download/download-pdf-for-net-now.html
Nuget link:
https://www.nuget.org/packages/Spire.PDF.NETCore/7.4.5
https://www.nuget.org/packages/Spire.PDF/7.4.5

Sincerely,
Marcia
E-iceblue support team
User avatar

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

Return to Spire.PDF