ByteScout Data Extraction Suite - VB.NET - Find text in pdf with pdf extractor sdk - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Data Extraction Suite – VB.NET – Find text in pdf with pdf extractor sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Data Extraction Suite – VB.NET – Find text in pdf with pdf extractor sdk

How to find text in pdf with pdf extractor sdk in VB.NET with ByteScout Data Extraction Suite

How to write a robust code in VB.NET to find text in pdf with pdf extractor sdk with this step-by-step tutorial

The sample source codes on this page shows how to find text in pdf with pdf extractor sdk in VB.NET. ByteScout Data Extraction Suite is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK. It can be applied to find text in pdf with pdf extractor sdk using VB.NET.

Want to save time? You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout Data Extraction Suite for find text in pdf with pdf extractor sdk below and use it in your application. Just copy and paste the code into your VB.NET application’s code and follow the instructions. Check VB.NET sample code samples to see if they respond to your needs and requirements for the project.

Trial version of ByteScout Data Extraction Suite is available for free. Source code samples are included to help you with your VB.NET app.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.vb
      
Imports System.Drawing Imports Bytescout.PDFExtractor Class Program Friend Shared Sub Main(args As String()) ' Create Bytescout.PDFExtractor.TextExtractor instance Dim extractor As New TextExtractor() extractor.RegistrationName = "demo" extractor.RegistrationKey = "demo" ' Load sample PDF document extractor.LoadDocumentFromFile(".\sample1.pdf") ' Set the matching mode. ' WordMatchingMode.None - treats the search string as substring; ' WordMatchingMode.ExactMatch - treats the search string as separate word; ' WordMatchingMode.SmartMatch - will find the word in various forms (like Adobe Reader). extractor.WordMatchingMode = WordMatchingMode.ExactMatch Dim pageCount As Integer = extractor.GetPageCount() For i As Integer = 0 To pageCount - 1 ' Search each page for "ipsum" string If extractor.Find(i, "ipsum", False) Then Do Console.WriteLine("") Console.WriteLine(("Found on page " & i & " at location ") + extractor.FoundText.Bounds.ToString()) Console.WriteLine("") ' Iterate through each element in the found text For Each element As SearchResultElement In extractor.FoundText.Elements Console.WriteLine((((("Element #" + element.Index.ToString() & " at left=") + element.Left.ToString() & "; top=") + element.Top.ToString() & "; width=") + element.Width.ToString() & "; height=") + element.Height.ToString()) Console.WriteLine("Text: " + element.Text) Console.WriteLine("Font is bold: " + element.FontIsBold.ToString()) Console.WriteLine("Font is italic:" + element.FontIsItalic.ToString()) Console.WriteLine("Font name: " + element.FontName) Console.WriteLine("Font size:" + element.FontSize.ToString()) Console.WriteLine("Font color:" + element.FontColor.ToString()) Next Loop While extractor.FindNext() End If Next ' Cleanup extractor.Dispose() Console.WriteLine() Console.WriteLine("Press any key to continue...") Console.ReadLine() End Sub End Class

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page

Explore ByteScout Data Extraction Suite Documentation

Explore Samples

Sign Up for ByteScout Data Extraction Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next