ByteScout PDF SDK - VB.NET - Read Form Values from W-4 form - ByteScout

ByteScout PDF SDK – VB.NET – Read Form Values from W-4 form

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VB.NET – Read Form Values from W-4 form

How to read form values from W 4 form in VB.NET using ByteScout PDF SDK

Tutorial on how to read form values from W 4 form in VB.NET

The code below will help you to implement an VB.NET app to read form values from W 4 form. ByteScout PDF SDK is the component to help programmers in generating new pdf files, modifying and updating existing pdf documents or pdf forms. Provides support for auto-filling pdf forms, adding text with adjustable font, style, size, font family, new form fields, vector and raster drawings. It can be used to read form values from W 4 form using VB.NET.

The SDK samples like this one below explain how to quickly make your application do read form values from W 4 form in VB.NET with the help of ByteScout PDF SDK. Just copy and paste the code into your VB.NET application’s code and follow the instruction. Enjoy writing a code with ready-to-use sample VB.NET codes.

Free trial version of ByteScout PDF SDK is available on our website. Documentation and source code samples are included.

Try ByteScout PDF SDK today: Get 60 Day Free Trial or sign up for Web API

Program.vb
      
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

Try ByteScout PDF SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout PDF SDK page

Explore ByteScout PDF SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next