These source code samples are listed and grouped by their programming language and functions they use. What is ByteScout PDF Extractor SDK? It is the SDK is designed to help developers with pdf tables and pdf data extraction from unstructured documents like pdf, tiff, scans, images, scanned and electronic forms. The library is powered by OCR, computer vision and AI to provide unique functionality like table detection, automatic table structure extraction, data restoration, data restructuring and reconstruction. Supports PDF, TIFF, PNG, JPG images as input and can output CSV, XML, JSON formatted data. Includes full set of utilities like pdf splitter, pdf merger, searchable pdf maker and other utilities. It can help you to find text in PDF with smart match in your VB.NET application.
Fast application programming interfaces of ByteScout PDF Extractor SDK for VB.NET plus the instruction and the code below will help you quickly learn how to find text in PDF with smart match. This VB.NET sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Detailed tutorials and documentation are available along with installed ByteScout PDF Extractor SDK if you’d like to dive deeper into the topic and the details of the API.
Free trial version of ByteScout PDF Extractor SDK is available for download from our website. Get it to try other source code samples for VB.NET.
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