Acro Form filling in PDF in C# (.NET Core)

Acro Form filling in PDF using DynamicPDF Merger is simple and easy.

How to do Acro Form filling in C#

Below are the steps and sample code to do Acro Form filling in PDF using the DynamicPDF Merger product. Acro Form field values can be set as they are merged into a new PDF document. This is done through the Form property of the MergeDocument class. The value that is specified needs to match the export value for the form field. Unicode values are fully supported.

Steps for setting values on a merged Acro Form in PDF

  1. Create a MergeDocument object.
  2. Set the field values.
  3. Save the PDF document.

Sample Code - C#

MergeDocument document = new MergeDocument( "output.pdf" );
document.Form.Fields["TextBox1"].Value = "My Text"; // TextBox field
document.Form.Fields["CheckBox1"].Value = "Yes"; // CheckBox field
document.Form.Fields["ComboBox1"].Value = "Item4"; // ComboBox field
document.Form.Fields["RadioButton1"].Value = "Item2"; // RadioButton field
ListBoxField listBox = (ListBoxField) document.Form.Fields["ListBox1"]; // ListBox field
listBox.SetValues( new string[] { "Item1", "Item3", "Item5" } );
document.Draw( "output.pdf" );

Getting Started

NuGet Package

DynamicPDF Merger is available on NuGet and is part of the ceTe.DynamicPDF.CoreSuite.NET package. The Core Suite package includes Generator, Merger and ReportWriter.

Nuget Logo
NuGet Package ID: ceTe.DynamicPDF.CoreSuite.NET

Example Project

An example project showing this functionality can be cloned or viewed from GitHub:

GitHub Logo
Clone or View Example Project on GitHub

DynamicPDF Merger Information

More information can be found here:

Available in Other Platforms

DynamicPDF Merger PDF Library is available for Java and COM/AxtiveX 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 18 Years)
  • Free Evaluation
  • .NET Core Support (Most Products)
  • Flexible Licensing

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