I use iTextSharp to extract text line by line from .pdf's and it works very well.
I am now looking at engineering drawings and have a need to identify lines of text that resides inside boundaries of circles in my file.
There can be many circles (not overlapping) in my files which typically have 2 or 3 lines of text inside the circle boundary.
Does anyone know if this is possible using iTextSharp?
Here is my existing code:
Try
Using reader As New PdfReader(filePath)
For intPages As Integer = 1 To reader.NumberOfPages
If intFirst = 1 Then
sbTXT.Append(Trim(PdfTextExtractor.GetTextFromPage(reader, intPages, New LocationTextExtractionStrategy())))
intFirst = 2
Else
sbTXT.Append(Environment.NewLine & Trim(PdfTextExtractor.GetTextFromPage(reader, intPages, New LocationTextExtractionStrategy())))
End If
Next
End Using
Catch ex As Exception
MsgBox("There was an error extracting text from the file", vbInformation, "Error Extracting Text")
End Try