Examples

Reading Form Fields in PDF (.NET Core/Framework)

Reading Form Fields in a PDF using DynamicPDF Core Suite is straightforward.

How to Read Form Fields in C#

The following steps and sample code illustrates reading Form Fields in a PDF using DynamicPDF Core Suite.

Steps for Reading Form Fields in PDF

  1. Create a MergeDocument object with the desired pdf.
  2. Set the Acro Form field values to local variables.
  3. Save the PDF document.

Sample Code - C#

MergeDocument document = new MergeDocument( "output.pdf" );
string textBox1Value = document.Form.Fields["TextBox1"].Value;
string checkBox1Value = document.Form.Fields["CheckBox1"].Value;
string comboBox1Value = document.Form.Fields["ComboBox1"].Value;
string radioButton1Value = document.Form.Fields["RadioButton1"].Value;
string listBox1Value = document.Form.Fields["ListBox1"].Value;  

GitHub Project

Clone or view the example project at GitHub. This example code is contained in the Examples/ReadFormFieldsExample.cs file.

Clone or View Example Project on GitHub

Getting Started

NuGet Package

DynamicPDF Core Suite is available on NuGet and is part of the ceTe.DynamicPDF.CoreSuite.NET package. The easiest way to install the package is through the Visual Studio Package Manager. You can also download the package directly from NuGet.

NuGet Package ID: ceTe.DynamicPDF.CoreSuite.NET

DynamicPDF Core Suite Information

More information can be found on the DynamicPDF Core Suite webpage.

Available on Other Platforms

DynamicPDF Core Suite is available for the Java and COM/ActiveX platforms. Refer to the respective product pages for more details.

Why Choose DynamicPDF?

  • Transparent Pricing
  • Lots of Features
  • Easy to Use
  • Great Support
  • Efficient Performance
  • Product Maturity (Over 22 Years)
  • Free Evaluation
  • .NET Core Support (Most Products)
  • Flexible Licensing

We’re Not The Only Ones That Think We’re Great!