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)
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(); } } }
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: