ByteScout PDF SDK - C# - Read Form Values from PDF form - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout PDF SDK – C# – Read Form Values from PDF form

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – C# – Read Form Values from PDF form

How to read form values from PDF form in C# with ByteScout PDF SDK

Write code in C# to read form values from PDF form with this step-by-step tutorial

The code below will help you to implement an C# app to read form values from PDF form. What is ByteScout PDF SDK? It 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. It can help you to read form values from PDF form in your C# application.

You will save a lot of time on writing and testing code as you may just take the C# code from ByteScout PDF SDK for read form values from PDF form below and use it in your application. In order to implement the functionality, you should copy and paste this code for C# below into your code editor with your app, compile and run your application. Enjoy writing a code with ready-to-use sample C# codes.

Free trial version of ByteScout PDF SDK is available for download from our website. Get it to 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(@"form.pdf"); pdfDocument.RegistrationName = "demo"; pdfDocument.RegistrationKey = "demo"; Page page = pdfDocument.Pages[0]; // Get widget by its name and get value string box1 = ((EditBox) page.Annotations["editBox1"]).Text; string box2 = ((EditBox) page.Annotations["editBox2"]).Text; bool checkBox1 = ((CheckBox) page.Annotations["checkBox1"]).Checked; // Cleanup pdfDocument.Dispose(); // Writing values to console Console.WriteLine("Form values are as follows:"); Console.WriteLine(box1); Console.WriteLine(box2); Console.WriteLine(checkBox1); Console.WriteLine(); Console.WriteLine("Press any key to exit...."); Console.ReadLine(); } } }

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