ByteScout Premium Suite - C# - Read form values from w-4 form with pdf sdk - ByteScout

ByteScout Premium Suite – C# – Read form values from w-4 form with pdf sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – C# – Read form values from w-4 form with pdf sdk

How to read form values from w 4 form with pdf sdk in C# and ByteScout Premium Suite

Learning is essential in computer world and the tutorial below will demonstrate how to read form values from w 4 form with pdf sdk in C#

Sample source code below will display you how to manage a complex task like read form values from w 4 form with pdf sdk in C#. 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 read form values from w 4 form with pdf sdk in your C# application.

The SDK samples given below describe how to quickly make your application do read form values from w 4 form with pdf sdk in C# with the help of ByteScout Premium Suite. IF you want to implement the functionality, just copy and paste this code for C# below into your code editor with your app, compile and run your application. Check C# sample code samples to see if they respond to your needs and requirements for the project.

Our website gives trial version of ByteScout Premium Suite for free. It also includes 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)

Program.cs
      
using Bytescout.PDF; using System; namespace ReadForm { class Program { static void Main(string[] args) { // Load PDF form Document pdfDocument = new Document(@"W-4_Filled.pdf"); pdfDocument.RegistrationName = "demo"; pdfDocument.RegistrationKey = "demo"; Page page = pdfDocument.Pages[0]; Console.WriteLine("W-4 Form values are as follows"); // FirstName and middle initial var cFirstName = ((EditBox)page.Annotations["f1_01[0]"]).Text; Console.WriteLine({code}quot;FirstName: {cFirstName}"); // LastName var cLastName = ((EditBox)page.Annotations["f1_02[0]"]).Text; Console.WriteLine({code}quot;LastName: {cLastName}"); // Security Number var cSecurityNumber = ((EditBox)page.Annotations["f1_03[0]"]).Text; Console.WriteLine({code}quot;Security Number: {cSecurityNumber}"); // Home Address var cHomeAddress = ((EditBox)page.Annotations["f1_04[0]"]).Text; Console.WriteLine({code}quot;Home Address-1: {cHomeAddress}"); // Home Address 2 var cHomeAddress2 = ((EditBox)page.Annotations["f1_05[0]"]).Text; Console.WriteLine({code}quot;Home Address-2: {cHomeAddress2}"); // Is Married var bIsMarried = ((CheckBox)page.Annotations["c1_1[1]"]).Checked; Console.WriteLine({code}quot;Is Married: {bIsMarried}"); // Cleanup pdfDocument.Dispose(); Console.WriteLine(); Console.WriteLine("Press any key to exit...."); Console.ReadLine(); } } }

ON-PREMISE OFFLINE SDK

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

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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next