How to Create PDF Forms
IronPDF offers a comprehensive set of form creation capabilities. It provides support for various types of form elements, including input fields, text areas, checkboxes, comboboxes, and radio buttons. With IronPDF, you can easily generate dynamic PDF forms that allow users to interact with the document by filling out form fields, making selections, and saving changes. This enables you to create interactive and user-friendly PDF forms for a wide range of applications and scenarios.
How to Create PDF Forms
- Download C# library create forms in PDF
- Utilize input and textarea tag in HTML to generate forms
- Specify type to checkbox and select tag will render Checkbox and Combobox
- Change type to radio to output radio button in PDF
- Check the output PDF

Install with NuGet
Install-Package IronPdf
Create Forms
IronPDF effortlessly create PDF documents with embedded form fields of various types. By adding dynamic form elements to an otherwise static PDF document, you can enhance its flexibility and interactivity.
Text Area and Input Forms
With IronPDF, you can easily create text area and input forms to capture user input within your PDF documents. Text area forms provide ample space for displaying and capturing larger amounts of text, while input forms allow users to enter specific values or responses.
:path=/static-assets/pdf/content-code-examples/how-to/create-forms-input-textarea.cs
using IronPdf;
// Input and Text Area forms HTML
string FormHtml = @"
<html>
<body>
<h2>Editable PDF Form</h2>
<form>
First name: <br> <input type='text' name='firstname' value=''> <br>
Last name: <br> <input type='text' name='lastname' value=''> <br>
Address: <br> <textarea name='address' rows='4' cols='50'></textarea>
</form>
</body>
</html>
";
// Instantiate Renderer
ChromePdfRenderer Renderer = new ChromePdfRenderer();
Renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
Renderer.RenderHtmlAsPdf(FormHtml).SaveAs("textAreaAndInputForm.pdf");
Imports IronPdf
' Input and Text Area forms HTML
Private FormHtml As String = "
<html>
<body>
<h2>Editable PDF Form</h2>
<form>
First name: <br> <input type='text' name='firstname' value=''> <br>
Last name: <br> <input type='text' name='lastname' value=''> <br>
Address: <br> <textarea name='address' rows='4' cols='50'></textarea>
</form>
</body>
</html>
"
' Instantiate Renderer
Private Renderer As New ChromePdfRenderer()
Renderer.RenderingOptions.CreatePdfFormsFromHtml = True
Renderer.RenderHtmlAsPdf(FormHtml).SaveAs("textAreaAndInputForm.pdf")
Output PDF document
Checkbox and Combobox Forms
When working with checkbox forms in IronPDF, you can access the boolean property of a checkbox by explicitly casting the FormField to a CheckBoxField using the syntax (IronPdf.Forms.CheckBoxField)PdfDocument.Form.GetFieldByName("NameOfField")
. This allows you to retrieve the selected state of the checkbox. Alternatively, you can check the Value property of the FormField object, where a selected checkbox will have a value of "On" and a not selected checkbox will have a value of "Off".
Combobox forms, providing users with a dropdown selection of options. Users can choose from the available options, providing valuable input within the PDF documents.
:path=/static-assets/pdf/content-code-examples/how-to/create-forms-checkbox-combobox.cs
using IronPdf;
// Load existing PDF document
PdfDocument pdf = PdfDocument.FromFile("Document.pdf");
// Add a bookmark
pdf.Bookmarks.AddBookMarkAtEnd("NameOfBookmark", 0);
// Add a sub-bookmark within the previous
pdf.Bookmarks.AddBookMarkAtEnd("NameOfSubBookmark", 1);
pdf.SaveAs("bookmarks.pdf");
Imports IronPdf
' Load existing PDF document
Private pdf As PdfDocument = PdfDocument.FromFile("Document.pdf")
' Add a bookmark
pdf.Bookmarks.AddBookMarkAtEnd("NameOfBookmark", 0)
' Add a sub-bookmark within the previous
pdf.Bookmarks.AddBookMarkAtEnd("NameOfSubBookmark", 1)
pdf.SaveAs("bookmarks.pdf")
Output PDF document
Radio buttons Forms
When working with radio button forms in IronPDF, each radio button is identified by its group using the name attribute in HTML. Radio buttons with the same name attribute are considered part of the same group, allowing only a single choice to be selected within that specific group. This ensures mutually exclusive selection within the group.
To access the selected choice from a radio button group, you can retrieve the value by accessing the Value property of the FormField object. Once a choice is selected, all the FormField objects within the same group will have the selected value.
:path=/static-assets/pdf/content-code-examples/how-to/create-forms-radiobutton.cs
using IronPdf;
// Radio buttons HTML
string FormHtml = @"
<html>
<body>
<h2>Editable PDF Form</h2>
Choose your preferred travel type: <br>
<input type='radio' name='traveltype' value='Bike'>
Bike <br>
<input type='radio' name='traveltype' value='Car'>
Car <br>
<input type='radio' name='traveltype' value='Airplane'>
Airplane
</body>
</html>
";
// Instantiate Renderer
ChromePdfRenderer Renderer = new ChromePdfRenderer();
Renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
Renderer.RenderHtmlAsPdf(FormHtml).SaveAs("radioButtomForm.pdf");
Imports IronPdf
' Radio buttons HTML
Private FormHtml As String = "
<html>
<body>
<h2>Editable PDF Form</h2>
Choose your preferred travel type: <br>
<input type='radio' name='traveltype' value='Bike'>
Bike <br>
<input type='radio' name='traveltype' value='Car'>
Car <br>
<input type='radio' name='traveltype' value='Airplane'>
Airplane
</body>
</html>
"
' Instantiate Renderer
Private Renderer As New ChromePdfRenderer()
Renderer.RenderingOptions.CreatePdfFormsFromHtml = True
Renderer.RenderHtmlAsPdf(FormHtml).SaveAs("radioButtomForm.pdf")