The sample source codes on this page shows how to find text in pdf with smart match with pdf extractor sdk in VB.NET. ByteScout Data Extraction Suite is the bundle that includes three SDK tools for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK. It can find text in pdf with smart match with pdf extractor sdk in VB.NET.
Want to quickly learn? This fast application programming interfaces of ByteScout Data Extraction Suite for VB.NET plus the guidelines and the code below will help you quickly learn how to find text in pdf with smart match with pdf extractor sdk. IF you want to implement the functionality, just copy and paste this code for VB.NET below into your code editor with your app, compile and run your application. Want to see how it works with your data then code testing will allow the function to be tested and work properly.
ByteScout provides the free trial version of ByteScout Data Extraction Suite along with the documentation and source code samples.
Imports Bytescout.PDFExtractor Class Program Friend Shared Sub Main(args As String()) Dim extractor As TextExtractor = New TextExtractor("demo", "demo") ' Load the document extractor.LoadDocumentFromFile("sample2.pdf") ' Smart match the search string like Adobe Reader extractor.WordMatchingMode = WordMatchingMode.SmartMatch Dim searchString As String = "land" ' Get page count Dim pageCount As Integer = extractor.GetPageCount() ' Iterate through pages For i As Integer = 0 To pageCount - 1 ' Search through page If extractor.Find(i, searchString, False) Then Do ' Output search results Console.WriteLine("Found on page " + i.ToString() + " at location " + extractor.FoundText.Bounds.ToString()) ' Now we are getting the found text Dim extractedString As String = extractor.FoundText.Text Console.WriteLine("Found text: " + extractedString) Loop While extractor.FindNext() ' Search next occurrence of the search string End If Next ' Cleanup extractor.Dispose() Console.WriteLine() Console.WriteLine("Press any key to exit...") Console.ReadKey() End Sub End Class