Nutrient .NET SDK

Create, fill, and edit PDF forms in C#

  • Create fillable forms with text fields, checkboxes, radio buttons, dropdowns, list boxes, and signature fields
  • Fill form fields programmatically — loop through fields by title and set values from any data source
  • Import form data from XFDF files or database streams
  • Flatten forms to lock values permanently, extract data to CSV, and attach PDF actions to fields

Need pricing or implementation help? Talk to Sales.

PDF FORMS IN C#

using GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.LoadFromFile(@"C:\temp\source.pdf");
int fieldCount = gdpicturePDF.GetFormFieldsCount();
for (int i = 0; i < fieldCount; i++)
{
int fieldId = gdpicturePDF.GetFormFieldId(i);
string title = gdpicturePDF.GetFormFieldTitle(fieldId);
if (title == "Family Name")
gdpicturePDF.SetFormFieldValue(fieldId, "Doe");
else if (title == "Given Name")
gdpicturePDF.SetFormFieldValue(fieldId, "Jane");
}
gdpicturePDF.SaveToFile(@"C:\temp\output.pdf");

USE CASES

When developers reach for this SDK

Generate fillable forms from templates

Create PDF forms programmatically — add text fields, checkboxes, radio buttons, dropdowns, and signature fields to any page. Configure font, size, color, and alignment per field.

Batch fill forms from a database

Loop through form fields by title and set values from any data source. Import XFDF data from files or database streams to fill hundreds of forms in a single run.

Extract form data for processing

Read field types, values, and locations from submitted forms. Export the data to CSV, push it to a database, or feed it into a downstream processing pipeline.

Flatten forms after submission

Once a form is completed, flatten all fields so the values become part of the page content. The form can no longer be edited — useful for archiving and compliance.

PDF form capabilities for .NET

Create fillable forms

Add form fields to any PDF page. Configure the coordinate system, measurement units, position, and dimensions. Each field returns an ID for later reference.


  • Text fields, checkboxes, radio buttons, and dropdowns
  • List boxes, push buttons, and signature fields
  • Configurable font type, size, color, and alignment

Fill form fields

Set field values programmatically by looping through fields and matching by title. Import data from XFDF files or database streams for batch filling.


  • Fill fields by title from any data source
  • Import from XFDF files
  • Import from database streams

Extract and read form data

Read field types, values, locations, and page numbers from submitted forms. Export structured data to CSV or pass it to downstream systems.


  • Read field type, value, title, and location
  • Get field page number and font size
  • Export form data to CSV

Flatten and secure forms

Flatten form fields so values become permanent page content. Flatten all fields at once or target specific pages. Remove fields entirely when needed.


  • Flatten all fields or by page
  • Remove single fields or all fields
  • Values become non-editable page content


ADVANCED CAPABILITIES

Beyond basic form filling

The SDK covers the full lifecycle of PDF forms — create fields, fill values, edit appearance, extract data, flatten for archiving, and attach interactive actions. All operations are available in both C# and VB.NET.

Illustration of PDF form viewing and filling
PDF actions on form fields

Attach actions to form fields — navigate to a page, open a URL, launch an application, or execute JavaScript when a user interacts with a field.


Combo box and list box items

Add, delete, and configure items in dropdown and list box fields. Enable custom entry on combo boxes and commit-on-selection for immediate value capture.


Text field appearance

Configure font type (standard, TrueType, or from file), font size, font color (RGB or CMYK), and text alignment for each text field independently.


VB.NET support

All form operations are available in VB.NET with the same API. The guides include complete code examples in both C# and VB.NET.


Frequently asked questions

How do I fill a PDF form in C#?

Load the PDF, loop through the form fields, match each field by its title, and set the value. Save the output to a new file. The SDK handles field parsing and value rendering. See the programmatic filling guide for a complete C# example.

How do I create a fillable PDF form in C#?

Load a PDF, set the coordinate system and measurement units, select a page, and add form fields. Each field type has its own method that returns a field ID for later reference. You can configure font, size, color, and alignment per field. See the create form guide.

How do I import form data from XFDF in C#?

The SDK can import form field values from XFDF files or from database streams containing XFDF data. You control whether to import form fields, annotations, or both. See the XFDF import guide and the database import guide.

How do I flatten a PDF form in C#?

Flattening converts form fields into permanent page content — values are preserved but can no longer be edited. You can flatten all fields at once or target a specific page. See the flatten guide.

How do I extract data from a PDF form in C#?

Loop through the form fields and read each field’s type, title, value, location, and page number. You can export the data to CSV or push it to any downstream system. See the extract form data guide.

What form field types does the .NET SDK support?

The SDK supports text fields (single and multiline), checkboxes, radio buttons, combo boxes (dropdowns), list boxes, push buttons, and digital signature fields. You can create, fill, edit, and remove any of these field types. See the form fields introduction.

Can I attach actions to form fields?

Yes. The SDK supports PDF actions on form fields — navigate to a page in the same or a different PDF, open a URL, launch an application, or execute JavaScript when a user interacts with a field. See the PDF actions guide.

Can I use the forms SDK with VB.NET?

Yes. All form operations are available in VB.NET with the same API surface. The form guides include complete code examples in both C# and VB.NET.


FREE TRIAL

Ready to get started?

Start creating and filling PDF forms in C# in minutes — no payment information required.