An easy to understand guide on how to find keyword in pdf and extract page with pdf extractor sdk in VB.NET with this source code sample. What is ByteScout Premium Suite? It is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can help you to find keyword in pdf and extract page with pdf extractor sdk in your VB.NET application.
This prolific sample source code in VB.NET for ByteScout Premium Suite contains various functions and other necessary options you should do calling the API to find keyword in pdf and extract page with pdf extractor sdk. Simply copy and paste in your VB.NET project or application you and then run your app! Check VB.NET sample code samples to see if they respond to your needs and requirements for the project.
ByteScout Premium Suite free trial version is available on our website. VB.NET and other programming languages are supported.
' This example page extraction by found keyword. Imports Bytescout.PDFExtractor Class Program Friend Shared Sub Main(args As String()) Dim inputFile As String = ".\sample2.pdf" ' Create Bytescout.PDFExtractor.TextExtractor instance Dim extractor As New TextExtractor() extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" ' Load sample PDF document extractor.LoadDocumentFromFile(inputFile) Dim pageCount As Integer = extractor.GetPageCount() ' Search each page for a keyword For i As Integer = 0 To pageCount - 1 If extractor.Find(i, "bombardment", False) Then ' Extract page Using splitter As New DocumentSplitter("demo", "demo") splitter.OptimizeSplittedDocuments = True Dim pageNumber As Integer = i + 1 ' (!) page number in ExtractPage() is 1-based Dim outputFile As String = ".\page" & pageNumber.ToString() & ".pdf" splitter.ExtractPage(inputFile, outputFile, pageNumber) Console.WriteLine("Extracted page " & pageNumber.ToString() & " to file """ & outputFile & """") End Using End If Next ' Cleanup extractor.Dispose() Console.WriteLine() Console.WriteLine("Press any key...") Console.ReadKey() End Sub End Class