ByteScout PDF SDK - C# - Fill Form W-9 - ByteScout

ByteScout PDF SDK – C# – Fill Form W-9

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – C# – Fill Form W-9

fill form W 9 in C# and ByteScout PDF SDK

Make fill form W 9 in C#

:

Tutorial on how to do fill form W 9 in C#

The coding tutorials are designed to help you test the features without need to write your own code. ByteScout PDF SDK was made to help with fill form W 9 in C#. ByteScout PDF SDK is the pdf library that can create, update and modify PDF files. Supports text with fonts and style selections, layers, form fields, drawing lines and objects, automatic tables, images. Can be used to create and fill pdf forms.

C#, code samples for C#, developers help to speed up the application development and writing a code when using ByteScout PDF SDK. C# sample code is all you need: copy and paste the code to your C# application’s code editor, add a reference to ByteScout PDF SDK (if you haven’t added yet) and you are ready to go! Test C# sample code examples whether they respond your needs and requirements for the project.

ByteScout PDF SDK is available as free trial. You may get it from our website along with all other source code samples for C# applications.

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 System; using System.Collections.Generic; using System.Diagnostics; using Bytescout.PDF; namespace FillFormExample { /// <summary> /// This example demonstrates how to fill PDF form programmatically. /// </summary> class Program { static void Main() { // Map of form fields and sample values to set Dictionary<string, object> fieldMap = new Dictionary<string, object>() { { "f1_1[0]", "John J Smith" }, // Name { "f1_2[0]", "12 Palm st., Hill Valley, CA 12345" } // Business address }; // Load PDF form Document pdfDocument = new Document(@".\W-9.pdf"); pdfDocument.RegistrationName = "demo"; pdfDocument.RegistrationKey = "demo"; // Get first page Page page = pdfDocument.Pages[0]; // Get widget by its name and change value foreach (KeyValuePair<string, object> keyValuePair in fieldMap) { Annotation annotation = page.Annotations[keyValuePair.Key]; if (annotation is CheckBox) { ((CheckBox)annotation).Checked = Convert.ToBoolean(keyValuePair.Value); } else if (annotation is EditBox) { ((EditBox)annotation).Text = (string)keyValuePair.Value; } } // Save modified document pdfDocument.Save("result.pdf"); // Cleanup pdfDocument.Dispose(); // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("result.pdf"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }

ON-PREMISE OFFLINE SDK

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

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 SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next