Hello,
I have a question: I would like to search for a text and as a result the page number or page numbers of pages in which the word stands.
Unfortunately, I have not found a code sample for VB.net as I could implement that.
Many Thanks
kkduke
Dim pdf As New PdfDocument()
pdf.LoadFromFile("Sample.pdf")
Dim lists As New List(Of PdfTextFind())()
For Each page As PdfPageBase In pdf.Pages
lists.Add(page.FindText("Spire").Finds)
Next page
For Each finds As PdfTextFind() In lists
For Each find As PdfTextFind In finds
Dim pageNumber As Integer = find.SearchPageIndex + 1
Console.WriteLine("Page number: {0}", pageNumber)
Next find
Next finds