Learn how to read form values from W 4 form in C# with this source code sample. 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 and you can use it to read form values from W 4 form with C#.
C# code samples for C# developers help to speed up coding of your application when using ByteScout PDF SDK. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Test C# sample code examples whether they respond your needs and requirements for the project.
Free trial version of ByteScout PDF SDK is available on our website. Documentation and source code samples are included.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
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(); } } }
60 Day Free Trial or Visit ByteScout PDF SDK Home Page
Explore ByteScout PDF SDK Documentation
Explore Samples
Sign Up for ByteScout PDF SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout PDF SDK Home Page
Explore ByteScout PDF SDK Documentation
Explore Samples
Sign Up for ByteScout PDF SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: