ByteScout PDF Extractor SDK - VB.NET - Find Text With Hyphens - 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 PDF Extractor SDK – VB.NET – Find Text With Hyphens

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – VB.NET – Find Text With Hyphens

ByteScout PDF Extractor SDK – VB.NET – Find Text With Hyphens

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("words-with-hyphens.pdf")

		Dim pageCount As Integer = extractor.GetPageCount()

		' Search each page for "hyphen" string
		For i As Integer = 0 To pageCount - 1
			If extractor.Find(i, "hyphen", False) Then
				Do
					Console.WriteLine("Found on page " & i.ToString() & " at location " & extractor.FoundText.Bounds.ToString())
				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


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next