i am using Spire.PDF in VB.net and i want to find a special text on a page (already got that!) and then get the Coordinates of the found text.
For finding the text on the page i am using this code:
- Code: Select all
Dim findOptions As PdfTextFindOptions = New PdfTextFindOptions()
findOptions.Parameter = TextFindParameter.WholeWord
For Each page As PdfPageBase In pdf.Pages
Dim finder As PdfTextFinder = New PdfTextFinder(page)
finder.Options = findOptions
Dim results As List(Of PdfTextFragment) = finder.Find("erteilt")
For Each text As PdfTextFragment In results
text.HighLight(Color.Green)
Next
Next
But i am geting stuck of how to get the Coordinates of the found text.
I found this guide on the website for C#, which uses the "Positions"-Function.
But this Guide is for C#, and for example "text.Positions(0)" didnt work in VB.net.
Maybe anyone can help me with this problem?
Thank you in Advance!