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

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

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF 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# with ByteScout PDF 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#

An easy to understand sample source code to learn how to read form values from w 4 form with pdf sdk in C# ByteScout PDF Suite can read form values from w 4 form with pdf sdk. It can be applied from C#. ByteScout PDF Suite is the set that includes 6 SDK products to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript.

Want to quickly learn? This fast application programming interfaces of ByteScout PDF Suite for C# plus the guidelines and the code below will help you quickly learn how to read form values from w 4 form with pdf sdk. Simply copy and paste in your C# project or application you and then run your app! Applying C# application mostly includes various stages of the software development so even if the functionality works please test it with your data and the production environment.

If you want to try other source code samples then the free trial version of ByteScout PDF Suite is available for download from our website. Just try other source code samples for C#.

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

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF 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 PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next