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.

Thu Aug 28, 2025 9:55 am

HI...

I have the attached PDF and I would to extract text in the area as image 2

I am using this code
Dim textExtractor As PdfTextExtractor = New PdfTextExtractor(page)
Dim extractOptions As PdfTextExtractOptions = New PdfTextExtractOptions With {
.ExtractArea = New RectangleF(2400, 72, 200, 72)
}
Dim text As String = textExtractor.ExtractText(extractOptions)
but not working
I am confused on the origin and coordinates
Can you help me?

hantrax1
 
Posts: 2
Joined: Thu Jan 23, 2025 7:55 am

Fri Aug 29, 2025 2:32 am

Hello,

Thank you for your inquiry.
I have analyzed the PDF document you provided and found that it consists of scanned images rather than editable text content. The text extraction functionality in Spire.PDF is specifically designed for text-based PDFs and cannot recognize text from images, which is why no text results were returned.
Spire.OCR provides the functionality to extract text from images. You can first convert your PDF file to images and then use Spire.OCR to perform text recognition and extraction. For specific usage methods, please refer to the following tutorials:
Convert PDF to Images in C# | .NET
C#: Extract Text from Images using the New Model of Spire.OCR for .NET
Please don't hesitate to let us know if you have any questions or need further assistance.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 331
Joined: Mon Apr 14, 2025 3:33 am

Return to Spire.PDF