The sample source codes on this page shows how to read form values from w 4 form with pdf sdk in VB.NET. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can be applied to read form values from w 4 form with pdf sdk using VB.NET.
These VB.NET code samples for VB.NET guide developers to speed up coding of the application when using ByteScout Premium Suite. Follow the instructions from scratch to work and copy the VB.NET code. Complete and detailed tutorials and documentation are available along with installed ByteScout Premium Suite if you’d like to learn more about the topic and the details of the API.
ByteScout provides the free trial version of ByteScout Premium Suite along with the documentation and source code samples.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
Imports Bytescout.PDF
''' <summary>
''' This example demonstrates how to get PDF form values programmatically.
''' </summary>
Class Program
Shared Sub Main()
' Load PDF form
Dim pdfDocument = New Document("W-4_Filled.pdf")
pdfDocument.RegistrationName = "demo"
pdfDocument.RegistrationKey = "demo"
' Read from first page
Dim page = pdfDocument.Pages(0)
Console.WriteLine("W-4 Form values are as follows")
' FirstName And middle initial
Dim cFirstName = DirectCast(page.Annotations("f1_01[0]"), EditBox).Text
Console.WriteLine({code}quot;FirstName: {cFirstName}")
' LastName
Dim cLastName = DirectCast(page.Annotations("f1_02[0]"), EditBox).Text
Console.WriteLine({code}quot;LastName: {cLastName}")
' Security Number
Dim cSecurityNumber = DirectCast(page.Annotations("f1_03[0]"), EditBox).Text
Console.WriteLine({code}quot;Security Number: {cSecurityNumber}")
' Home Address
Dim cHomeAddress = DirectCast(page.Annotations("f1_04[0]"), EditBox).Text
Console.WriteLine({code}quot;Home Address-1: {cHomeAddress}")
' Home Address 2
Dim cHomeAddress2 = DirectCast(page.Annotations("f1_05[0]"), EditBox).Text
Console.WriteLine({code}quot;Home Address-2: {cHomeAddress2}")
' Is Married
Dim bIsMarried = DirectCast(page.Annotations("c1_1[1]"), CheckBox).Checked
Console.WriteLine({code}quot;Is Married: {bIsMarried}")
' Cleanup
pdfDocument.Dispose()
Console.WriteLine()
Console.WriteLine("Press any key to exit....")
Console.ReadLine()
End Sub
End Class
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: