PDF AcroForms在C# .NET中使用IronPDF賦予開發者對互動表單字段的完整程式控制,從讀取和填寫現有政府表格到從HTML建立新表單,提取提交資料,以及批量處理數千份文件。 IronPDF處理每種型別的標準字段,包括文字輸入、複選框、單選按鈕、下拉選單和簽名字段,讓您可以使用現有的HTML和CSS技能自動化完整的PDF表單生命週期。
using IronPdf;// Load an existing PDF form documentPdfDocument pdfForm = PdfDocument.FromFile("application-form.pdf");// Access the form object and iterate through all fieldsforeach (var field in pdfForm.Form){ // Access field properties: field.Name, field.Type, field.Value, field.ReadOnly}
using IronPdf;
// Load an existing PDF form document
PdfDocument pdfForm = PdfDocument.FromFile("application-form.pdf");
// Access the form object and iterate through all fields
foreach (var field in pdfForm.Form)
{
// Access field properties: field.Name, field.Type, field.Value, field.ReadOnly
}
ImportsIronPdf' Load an existing PDF form documentDim pdfForm AsPdfDocument = PdfDocument.FromFile("application-form.pdf")' Access the form object and iterate through all fieldsFor Each field In pdfForm.Form ' Access field properties: field.Name, field.Type, field.Value, field.ReadOnlyNext
Imports IronPdf
' Load an existing PDF form document
Dim pdfForm As PdfDocument = PdfDocument.FromFile("application-form.pdf")
' Access the form object and iterate through all fields
For Each field In pdfForm.Form
' Access field properties: field.Name, field.Type, field.Value, field.ReadOnly
Next
using IronPdf;using System;PdfDocument pdfForm = PdfDocument.FromFile("employee-onboarding.pdf");// Find specific fields by name - use try-catch for fields that may not existtry{ var firstNameField = pdfForm.Form.FindFormField("firstName"); // Use firstNameField.Value to get or set the field value}catch (Exception){ // Field not found in this document}// For fields you know exist, you can access them directlyvar lastNameField = pdfForm.Form.FindFormField("lastName");var departmentField = pdfForm.Form.FindFormField("department");
using IronPdf;
using System;
PdfDocument pdfForm = PdfDocument.FromFile("employee-onboarding.pdf");
// Find specific fields by name - use try-catch for fields that may not exist
try
{
var firstNameField = pdfForm.Form.FindFormField("firstName");
// Use firstNameField.Value to get or set the field value
}
catch (Exception)
{
// Field not found in this document
}
// For fields you know exist, you can access them directly
var lastNameField = pdfForm.Form.FindFormField("lastName");
var departmentField = pdfForm.Form.FindFormField("department");
ImportsIronPdfImportsSystemDim pdfForm AsPdfDocument = PdfDocument.FromFile("employee-onboarding.pdf")' Find specific fields by name - use try-catch for fields that may not existTry Dim firstNameField = pdfForm.Form.FindFormField("firstName") ' Use firstNameField.Value to get or set the field valueCatch ex AsException ' Field not found in this documentEndTry' For fields you know exist, you can access them directlyDim lastNameField = pdfForm.Form.FindFormField("lastName")Dim departmentField = pdfForm.Form.FindFormField("department")
Imports IronPdf
Imports System
Dim pdfForm As PdfDocument = PdfDocument.FromFile("employee-onboarding.pdf")
' Find specific fields by name - use try-catch for fields that may not exist
Try
Dim firstNameField = pdfForm.Form.FindFormField("firstName")
' Use firstNameField.Value to get or set the field value
Catch ex As Exception
' Field not found in this document
End Try
' For fields you know exist, you can access them directly
Dim lastNameField = pdfForm.Form.FindFormField("lastName")
Dim departmentField = pdfForm.Form.FindFormField("department")
using IronPdf;// Load the form documentPdfDocument pdf = PdfDocument.FromFile("customer-registration.pdf");// Fill text fields with customer informationpdf.Form.FindFormField("fullName").Value = "Sarah Johnson";pdf.Form.FindFormField("email").Value = "sarah.johnson@example.com";pdf.Form.FindFormField("phone").Value = "(555) 123-4567";pdf.Form.FindFormField("address").Value = "742 Evergreen Terrace\r\nSpringfield, IL 62701";// Check a checkbox fieldpdf.Form.FindFormField("newsletterOptIn").Value = "Yes";// Select an option from a dropdownpdf.Form.FindFormField("accountType").Value = "Premium";// Save the filled formpdf.SaveAs("customer-registration-completed.pdf");
using IronPdf;
// Load the form document
PdfDocument pdf = PdfDocument.FromFile("customer-registration.pdf");
// Fill text fields with customer information
pdf.Form.FindFormField("fullName").Value = "Sarah Johnson";
pdf.Form.FindFormField("email").Value = "sarah.johnson@example.com";
pdf.Form.FindFormField("phone").Value = "(555) 123-4567";
pdf.Form.FindFormField("address").Value = "742 Evergreen Terrace\r\nSpringfield, IL 62701";
// Check a checkbox field
pdf.Form.FindFormField("newsletterOptIn").Value = "Yes";
// Select an option from a dropdown
pdf.Form.FindFormField("accountType").Value = "Premium";
// Save the filled form
pdf.SaveAs("customer-registration-completed.pdf");
ImportsIronPdf' Load the form documentDim pdf AsPdfDocument = PdfDocument.FromFile("customer-registration.pdf")' Fill text fields with customer informationpdf.Form.FindFormField("fullName").Value = "Sarah Johnson"pdf.Form.FindFormField("email").Value = "sarah.johnson@example.com"pdf.Form.FindFormField("phone").Value = "(555) 123-4567"pdf.Form.FindFormField("address").Value = "742 Evergreen Terrace" & vbCrLf & "Springfield, IL 62701"' Check a checkbox fieldpdf.Form.FindFormField("newsletterOptIn").Value = "Yes"' Select an option from a dropdownpdf.Form.FindFormField("accountType").Value = "Premium"' Save the filled formpdf.SaveAs("customer-registration-completed.pdf")
Imports IronPdf
' Load the form document
Dim pdf As PdfDocument = PdfDocument.FromFile("customer-registration.pdf")
' Fill text fields with customer information
pdf.Form.FindFormField("fullName").Value = "Sarah Johnson"
pdf.Form.FindFormField("email").Value = "sarah.johnson@example.com"
pdf.Form.FindFormField("phone").Value = "(555) 123-4567"
pdf.Form.FindFormField("address").Value = "742 Evergreen Terrace" & vbCrLf & "Springfield, IL 62701"
' Check a checkbox field
pdf.Form.FindFormField("newsletterOptIn").Value = "Yes"
' Select an option from a dropdown
pdf.Form.FindFormField("accountType").Value = "Premium"
' Save the filled form
pdf.SaveAs("customer-registration-completed.pdf")
using IronPdf;PdfDocument pdf = PdfDocument.FromFile("survey-form.pdf");// Get a radio button group and examine its optionsvar satisfactionField = pdf.Form.FindFormField("satisfactionLevel");// Access available options from the radio button annotationsforeach (var annotation in satisfactionField.Annotations){ // annotation.OnAppearance contains the option value}// Select one option from the groupsatisfactionField.Value = "Very Satisfied";pdf.SaveAs("survey-completed.pdf");
using IronPdf;
PdfDocument pdf = PdfDocument.FromFile("survey-form.pdf");
// Get a radio button group and examine its options
var satisfactionField = pdf.Form.FindFormField("satisfactionLevel");
// Access available options from the radio button annotations
foreach (var annotation in satisfactionField.Annotations)
{
// annotation.OnAppearance contains the option value
}
// Select one option from the group
satisfactionField.Value = "Very Satisfied";
pdf.SaveAs("survey-completed.pdf");
ImportsIronPdfDim pdf AsPdfDocument = PdfDocument.FromFile("survey-form.pdf")' Get a radio button group and examine its optionsDim satisfactionField = pdf.Form.FindFormField("satisfactionLevel")' Access available options from the radio button annotationsFor Each annotation In satisfactionField.Annotations ' annotation.OnAppearance contains the option valueNext' Select one option from the groupsatisfactionField.Value = "Very Satisfied"pdf.SaveAs("survey-completed.pdf")
Imports IronPdf
Dim pdf As PdfDocument = PdfDocument.FromFile("survey-form.pdf")
' Get a radio button group and examine its options
Dim satisfactionField = pdf.Form.FindFormField("satisfactionLevel")
' Access available options from the radio button annotations
For Each annotation In satisfactionField.Annotations
' annotation.OnAppearance contains the option value
Next
' Select one option from the group
satisfactionField.Value = "Very Satisfied"
pdf.SaveAs("survey-completed.pdf")
using IronPdf;PdfDocument pdf = PdfDocument.FromFile("order-form.pdf");var shippingMethod = pdf.Form.FindFormField("shippingMethod");// Access all available shipping options via shippingMethod.Choices// Select express shippingshippingMethod.Value = "Express (2-3 days)";pdf.SaveAs("order-form-filled.pdf");
using IronPdf;
PdfDocument pdf = PdfDocument.FromFile("order-form.pdf");
var shippingMethod = pdf.Form.FindFormField("shippingMethod");
// Access all available shipping options via shippingMethod.Choices
// Select express shipping
shippingMethod.Value = "Express (2-3 days)";
pdf.SaveAs("order-form-filled.pdf");
ImportsIronPdfDim pdf AsPdfDocument = PdfDocument.FromFile("order-form.pdf")Dim shippingMethod = pdf.Form.FindFormField("shippingMethod")' Access all available shipping options via shippingMethod.Choices' Select express shippingshippingMethod.Value = "Express (2-3 days)"pdf.SaveAs("order-form-filled.pdf")
Imports IronPdf
Dim pdf As PdfDocument = PdfDocument.FromFile("order-form.pdf")
Dim shippingMethod = pdf.Form.FindFormField("shippingMethod")
' Access all available shipping options via shippingMethod.Choices
' Select express shipping
shippingMethod.Value = "Express (2-3 days)"
pdf.SaveAs("order-form-filled.pdf")
using IronPdf;using System.Collections.Generic;// Form data stored in a dictionaryvar formData = new Dictionary<string, string>{ { "applicantName", "Michael Chen" }, { "dateOfBirth", "1985-03-15" }, { "ssn", "XXX-XX-1234" }, { "streetAddress", "456 Oak Avenue" }, { "city", "Portland" }, { "state", "OR" }, { "zipCode", "97201" }, { "employmentStatus", "Full-Time" }, { "annualIncome", "75000" }, { "agreeToTerms", "Yes" }};PdfDocument pdf = PdfDocument.FromFile("loan-application.pdf");// Iterate through the dictionary and fill matching fieldsforeach (var entry in formData){ var field = pdf.Form.FindFormField(entry.Key); if (field != null) { field.Value = entry.Value; }}pdf.SaveAs("loan-application-filled.pdf");
using IronPdf;
using System.Collections.Generic;
// Form data stored in a dictionary
var formData = new Dictionary<string, string>
{
{ "applicantName", "Michael Chen" },
{ "dateOfBirth", "1985-03-15" },
{ "ssn", "XXX-XX-1234" },
{ "streetAddress", "456 Oak Avenue" },
{ "city", "Portland" },
{ "state", "OR" },
{ "zipCode", "97201" },
{ "employmentStatus", "Full-Time" },
{ "annualIncome", "75000" },
{ "agreeToTerms", "Yes" }
};
PdfDocument pdf = PdfDocument.FromFile("loan-application.pdf");
// Iterate through the dictionary and fill matching fields
foreach (var entry in formData)
{
var field = pdf.Form.FindFormField(entry.Key);
if (field != null)
{
field.Value = entry.Value;
}
}
pdf.SaveAs("loan-application-filled.pdf");
ImportsIronPdfImportsSystem.Collections.Generic' Form data stored in a dictionaryDim formData As New Dictionary(OfString, String) From { {"applicantName", "Michael Chen"}, {"dateOfBirth", "1985-03-15"}, {"ssn", "XXX-XX-1234"}, {"streetAddress", "456 Oak Avenue"}, {"city", "Portland"}, {"state", "OR"}, {"zipCode", "97201"}, {"employmentStatus", "Full-Time"}, {"annualIncome", "75000"}, {"agreeToTerms", "Yes"}}Dim pdf AsPdfDocument = PdfDocument.FromFile("loan-application.pdf")' Iterate through the dictionary and fill matching fieldsFor Each entry In formData Dim field = pdf.Form.FindFormField(entry.Key) If field IsNot Nothing Then field.Value = entry.Value End IfNextpdf.SaveAs("loan-application-filled.pdf")
Imports IronPdf
Imports System.Collections.Generic
' Form data stored in a dictionary
Dim formData As New Dictionary(Of String, String) From {
{"applicantName", "Michael Chen"},
{"dateOfBirth", "1985-03-15"},
{"ssn", "XXX-XX-1234"},
{"streetAddress", "456 Oak Avenue"},
{"city", "Portland"},
{"state", "OR"},
{"zipCode", "97201"},
{"employmentStatus", "Full-Time"},
{"annualIncome", "75000"},
{"agreeToTerms", "Yes"}
}
Dim pdf As PdfDocument = PdfDocument.FromFile("loan-application.pdf")
' Iterate through the dictionary and fill matching fields
For Each entry In formData
Dim field = pdf.Form.FindFormField(entry.Key)
If field IsNot Nothing Then
field.Value = entry.Value
End If
Next
pdf.SaveAs("loan-application-filled.pdf")
範例輸出
基於字典的方法將資料與邏輯清晰地分開。 FindFormField()定位對應的PDF字段,如果字段存在則分配值。 if (field != null)的空值檢查防止在字典包含與文件中不匹配的字段時出現異常。 在處理可能包含多餘字段而表單中不存在的資料源時,這特別有用。
對於更複雜的情況,您可能會定義一個表示表單資料的類,然後使用反射或映射函式將屬性值轉移到表單字段。
using IronPdf;using System;// Define a strongly-typed class for the form datapublic class EmployeeRecord{ public stringFirstName { get; set; } public stringLastName { get; set; } public stringEmployeeId { get; set; } public stringDepartment { get; set; } public DateTimeHireDate { get; set; } public stringJobTitle { get; set; } public boolDirectDeposit { get; set; }}public class FormFiller{ public voidFillEmployeeForm(EmployeeRecord employee, string templatePath, string outputPath) { PdfDocument pdf = PdfDocument.FromFile(templatePath); // Map object properties to form fields pdf.Form.FindFormField("firstName").Value = employee.FirstName; pdf.Form.FindFormField("lastName").Value = employee.LastName; pdf.Form.FindFormField("employeeId").Value = employee.EmployeeId; pdf.Form.FindFormField("department").Value = employee.Department; pdf.Form.FindFormField("hireDate").Value = employee.HireDate.ToString("MM/dd/yyyy"); pdf.Form.FindFormField("jobTitle").Value = employee.JobTitle; pdf.Form.FindFormField("directDeposit").Value = employee.DirectDeposit ? "Yes" : "No"; pdf.SaveAs(outputPath); }}// Usage exampleclass Program{ static voidMain() { var employee = new EmployeeRecord {FirstName = "Jennifer",LastName = "Martinez",EmployeeId = "EMP-2024-0892",Department = "Engineering",HireDate = new DateTime(2024, 6, 15),JobTitle = "Senior Developer",DirectDeposit = true }; var filler = new FormFiller(); filler.FillEmployeeForm(employee, "new-hire-form.pdf", "jennifer-martinez-onboarding.pdf"); }}
using IronPdf;
using System;
// Define a strongly-typed class for the form data
public class EmployeeRecord
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string EmployeeId { get; set; }
public string Department { get; set; }
public DateTime HireDate { get; set; }
public string JobTitle { get; set; }
public bool DirectDeposit { get; set; }
}
public class FormFiller
{
public void FillEmployeeForm(EmployeeRecord employee, string templatePath, string outputPath)
{
PdfDocument pdf = PdfDocument.FromFile(templatePath);
// Map object properties to form fields
pdf.Form.FindFormField("firstName").Value = employee.FirstName;
pdf.Form.FindFormField("lastName").Value = employee.LastName;
pdf.Form.FindFormField("employeeId").Value = employee.EmployeeId;
pdf.Form.FindFormField("department").Value = employee.Department;
pdf.Form.FindFormField("hireDate").Value = employee.HireDate.ToString("MM/dd/yyyy");
pdf.Form.FindFormField("jobTitle").Value = employee.JobTitle;
pdf.Form.FindFormField("directDeposit").Value = employee.DirectDeposit ? "Yes" : "No";
pdf.SaveAs(outputPath);
}
}
// Usage example
class Program
{
static void Main()
{
var employee = new EmployeeRecord
{
FirstName = "Jennifer",
LastName = "Martinez",
EmployeeId = "EMP-2024-0892",
Department = "Engineering",
HireDate = new DateTime(2024, 6, 15),
JobTitle = "Senior Developer",
DirectDeposit = true
};
var filler = new FormFiller();
filler.FillEmployeeForm(employee, "new-hire-form.pdf", "jennifer-martinez-onboarding.pdf");
}
}
using IronPdf;using System;using System.Collections.Generic;using System.Text.RegularExpressions;public class FormValidationResult{ public boolIsValid { get; set; } public List<string> Errors { get; set; } = new List<string>();}public class FormValidator{ public FormValidationResultValidateApplicationData(Dictionary<string, string> formData, PdfDocument pdf) { var result = new FormValidationResult { IsValid = true }; // Check that all required fields have values var requiredFields = new[] { "applicantName", "email", "phone", "ssn" }; foreach (var fieldName in requiredFields) { if (!formData.ContainsKey(fieldName) || string.IsNullOrWhiteSpace(formData[fieldName])) { result.Errors.Add($"Required field '{fieldName}' is missing or empty"); result.IsValid = false; } } // Validate email format if (formData.ContainsKey("email")) { var emailPattern = @"^[^@\s]+@[^@\s]+\.[^@\s]+$"; if (!Regex.IsMatch(formData["email"], emailPattern)) { result.Errors.Add("Email address format is invalid"); result.IsValid = false; } } // Validate phone number format if (formData.ContainsKey("phone")) { var phonePattern = @"^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$"; if (!Regex.IsMatch(formData["phone"], phonePattern)) { result.Errors.Add("Phone number format is invalid"); result.IsValid = false; } } // Verify that form fields exist in the PDF foreach (var fieldName in formData.Keys) { try { var field = pdf.Form.FindFormField(fieldName); // Field exists } catch { result.Errors.Add($"Field '{fieldName}' does not exist in the PDF form"); result.IsValid = false; } } // Check dropdown values against available choices if (formData.ContainsKey("state")) { try { var stateField = pdf.Form.FindFormField("state"); if (stateField.Choices != null) { bool validChoice = false; foreach (var choice in stateField.Choices) { if (choice == formData["state"]) { validChoice = true; break; } } if (!validChoice) { result.Errors.Add($"'{formData["state"]}' is not a valid option for the state field"); result.IsValid = false; } } } catch { // State field doesn't exist, skip validation } } return result; }}// Usage exampleclass Program{ static voidMain() { var formData = new Dictionary<string, string> { { "applicantName", "John Doe" }, { "email", "invalid-email" }, { "phone", "555-1234" }, { "state", "XX" } }; PdfDocument pdf = PdfDocument.FromFile("application.pdf"); var validator = new FormValidator(); var validationResult = validator.ValidateApplicationData(formData, pdf); if (validationResult.IsValid) { // Proceed with form fill } else { // Handle validation errors in validationResult.Errors } }}
using IronPdf;
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
public class FormValidationResult
{
public bool IsValid { get; set; }
public List<string> Errors { get; set; } = new List<string>();
}
public class FormValidator
{
public FormValidationResult ValidateApplicationData(Dictionary<string, string> formData, PdfDocument pdf)
{
var result = new FormValidationResult { IsValid = true };
// Check that all required fields have values
var requiredFields = new[] { "applicantName", "email", "phone", "ssn" };
foreach (var fieldName in requiredFields)
{
if (!formData.ContainsKey(fieldName) || string.IsNullOrWhiteSpace(formData[fieldName]))
{
result.Errors.Add($"Required field '{fieldName}' is missing or empty");
result.IsValid = false;
}
}
// Validate email format
if (formData.ContainsKey("email"))
{
var emailPattern = @"^[^@\s]+@[^@\s]+\.[^@\s]+$";
if (!Regex.IsMatch(formData["email"], emailPattern))
{
result.Errors.Add("Email address format is invalid");
result.IsValid = false;
}
}
// Validate phone number format
if (formData.ContainsKey("phone"))
{
var phonePattern = @"^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$";
if (!Regex.IsMatch(formData["phone"], phonePattern))
{
result.Errors.Add("Phone number format is invalid");
result.IsValid = false;
}
}
// Verify that form fields exist in the PDF
foreach (var fieldName in formData.Keys)
{
try
{
var field = pdf.Form.FindFormField(fieldName);
// Field exists
}
catch
{
result.Errors.Add($"Field '{fieldName}' does not exist in the PDF form");
result.IsValid = false;
}
}
// Check dropdown values against available choices
if (formData.ContainsKey("state"))
{
try
{
var stateField = pdf.Form.FindFormField("state");
if (stateField.Choices != null)
{
bool validChoice = false;
foreach (var choice in stateField.Choices)
{
if (choice == formData["state"])
{
validChoice = true;
break;
}
}
if (!validChoice)
{
result.Errors.Add($"'{formData["state"]}' is not a valid option for the state field");
result.IsValid = false;
}
}
}
catch
{
// State field doesn't exist, skip validation
}
}
return result;
}
}
// Usage example
class Program
{
static void Main()
{
var formData = new Dictionary<string, string>
{
{ "applicantName", "John Doe" },
{ "email", "invalid-email" },
{ "phone", "555-1234" },
{ "state", "XX" }
};
PdfDocument pdf = PdfDocument.FromFile("application.pdf");
var validator = new FormValidator();
var validationResult = validator.ValidateApplicationData(formData, pdf);
if (validationResult.IsValid)
{
// Proceed with form fill
}
else
{
// Handle validation errors in validationResult.Errors
}
}
}
從頭建立PDF表單使您對表單的結構和外觀擁有完全控制權。 IronPDF的HTML-to-PDF渲染引擎解釋標準HTML表單元素並將其轉換為PDF AcroForm字段。 這種方法允許您使用熟悉的網頁技術設計表單,包括使用CSS進行樣式設計。 有關建立表單的完整指南,請參見Create PDF Forms in C#。
using IronPdf;// Define the form layout using HTML with form elementsstring formHtml = @"E html>le>body { font-family: Arial, sans-serif; max-width: 600px; margin: 40px auto; padding: 20px;}h1 { color: #333; border-bottom: 2px solid #4CAF50; padding-bottom: 10px;}.form-group { margin-bottom: 15px;}label { display: block; margin-bottom: 5px; font-weight: bold; color: #555;}input[type='text'], textarea { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box;}textarea { height: 100px; resize: none;}.required::after { content: ' *'; color: red;}yle>Customer Feedback Form</h1>m><div class='form-group'> <label class='required'>Full Name</label> <input type='text' name='customerName' /></div><div class='form-group'> <label class='required'>Email Address</label> <input type='text' name='customerEmail' /></div><div class='form-group'> <label>Phone Number</label> <input type='text' name='customerPhone' /></div><div class='form-group'> <label>Order Number</label> <input type='text' name='orderNumber' /></div><div class='form-group'> <label class='required'>Your Feedback</label> <textarea name='feedbackText'></textarea></div>rm>;// Create the renderer and enable form creationChromePdfRenderer renderer = new ChromePdfRenderer();renderer.RenderingOptions.CreatePdfFormsFromHtml = true;// Render the HTML to a PDF with interactive form fieldsPdfDocument pdf = renderer.RenderHtmlAsPdf(formHtml);pdf.SaveAs("customer-feedback-form.pdf");
using IronPdf;
// Define the form layout using HTML with form elements
string formHtml = @"
E html>
le>
body {
font-family: Arial, sans-serif;
max-width: 600px;
margin: 40px auto;
padding: 20px;
}
h1 {
color: #333;
border-bottom: 2px solid #4CAF50;
padding-bottom: 10px;
}
.form-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #555;
}
input[type='text'], textarea {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
box-sizing: border-box;
}
textarea {
height: 100px;
resize: none;
}
.required::after {
content: ' *';
color: red;
}
yle>
Customer Feedback Form</h1>
m>
<div class='form-group'>
<label class='required'>Full Name</label>
<input type='text' name='customerName' />
</div>
<div class='form-group'>
<label class='required'>Email Address</label>
<input type='text' name='customerEmail' />
</div>
<div class='form-group'>
<label>Phone Number</label>
<input type='text' name='customerPhone' />
</div>
<div class='form-group'>
<label>Order Number</label>
<input type='text' name='orderNumber' />
</div>
<div class='form-group'>
<label class='required'>Your Feedback</label>
<textarea name='feedbackText'></textarea>
</div>
rm>
;
// Create the renderer and enable form creation
ChromePdfRenderer renderer = new ChromePdfRenderer();
renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
// Render the HTML to a PDF with interactive form fields
PdfDocument pdf = renderer.RenderHtmlAsPdf(formHtml);
pdf.SaveAs("customer-feedback-form.pdf");
ImportsIronPdf' Define the form layout using HTML with form elementsDim formHtml AsString = "<!DOCTYPE html><html><head> <style> body { font-family: Arial, sans-serif; max-width: 600px; margin: 40px auto; padding: 20px; } h1 { color: #333; border-bottom: 2px solid #4CAF50; padding-bottom: 10px; } .form-group { margin-bottom: 15px; } label { display: block; margin-bottom: 5px; font-weight: bold; color: #555; } input[type='text'], textarea { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; } textarea { height: 100px; resize: none; } .required::after { content: ' *'; color: red; } </style></head><body> <h1>Customer Feedback Form</h1> <form> <div class='form-group'> <label class='required'>Full Name</label> <input type='text' name='customerName' /> </div> <div class='form-group'> <label class='required'>Email Address</label> <input type='text' name='customerEmail' /> </div> <div class='form-group'> <label>Phone Number</label> <input type='text' name='customerPhone' /> </div> <div class='form-group'> <label>Order Number</label> <input type='text' name='orderNumber' /> </div> <div class='form-group'> <label class='required'>Your Feedback</label> <textarea name='feedbackText'></textarea> </div> </form></body></html>"' Create the renderer and enable form creationDim renderer As New ChromePdfRenderer()renderer.RenderingOptions.CreatePdfFormsFromHtml = True' Render the HTML to a PDF with interactive form fieldsDim pdf AsPdfDocument = renderer.RenderHtmlAsPdf(formHtml)pdf.SaveAs("customer-feedback-form.pdf")
Imports IronPdf
' Define the form layout using HTML with form elements
Dim formHtml As String = "
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
max-width: 600px;
margin: 40px auto;
padding: 20px;
}
h1 {
color: #333;
border-bottom: 2px solid #4CAF50;
padding-bottom: 10px;
}
.form-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #555;
}
input[type='text'], textarea {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
box-sizing: border-box;
}
textarea {
height: 100px;
resize: none;
}
.required::after {
content: ' *';
color: red;
}
</style>
</head>
<body>
<h1>Customer Feedback Form</h1>
<form>
<div class='form-group'>
<label class='required'>Full Name</label>
<input type='text' name='customerName' />
</div>
<div class='form-group'>
<label class='required'>Email Address</label>
<input type='text' name='customerEmail' />
</div>
<div class='form-group'>
<label>Phone Number</label>
<input type='text' name='customerPhone' />
</div>
<div class='form-group'>
<label>Order Number</label>
<input type='text' name='orderNumber' />
</div>
<div class='form-group'>
<label class='required'>Your Feedback</label>
<textarea name='feedbackText'></textarea>
</div>
</form>
</body>
</html>
"
' Create the renderer and enable form creation
Dim renderer As New ChromePdfRenderer()
renderer.RenderingOptions.CreatePdfFormsFromHtml = True
' Render the HTML to a PDF with interactive form fields
Dim pdf As PdfDocument = renderer.RenderHtmlAsPdf(formHtml)
pdf.SaveAs("customer-feedback-form.pdf")
範例輸出
關鍵設置是ChromePdfRenderer將HTML <textarea>元素轉換為其PDF AcroForm等效項。 若無此設置,輸入將作為靜態視覺元素渲染,無交互性。 每個輸入元素的name屬性成為結果PDF中的字段名稱。 這些是您在程式化填寫表單時將使用的標識符。 選擇描述性、一致性強的名稱,使您的表單填寫程式碼易讀且便於維護。 有關HTML轉PDF的更多內容,請參見Convert HTML to PDF in C#教程。
using IronPdf;using IronSoftware.Forms;// First create the base form using HTMLstring formHtml = @"E html>le>body { font-family: Arial, sans-serif; max-width: 600px; margin: 40px auto; padding: 30px;}h1 { text-align: center; color: #2c3e50;}.agreement-text { background: #f5f5f5; padding: 20px; border-radius: 5px; margin: 20px 0; line-height: 1.6;}.signature-section { margin-top: 40px; padding-top: 20px; border-top: 1px solid #ddd;}.signature-line { margin-top: 60px; border-bottom: 1px solid #333; width: 300px;}.signature-label { font-size: 12px; color: #666; margin-top: 5px;}.date-field { margin-top: 20px;}.date-field label { font-weight: bold;}.date-field input { padding: 8px; border: 1px solid #ccc; border-radius: 4px; width: 150px;}yle>Non-Disclosure Agreement</h1> class='agreement-text'><p>By signing this document, I acknowledge that I have read and understoodthe terms of the Non-Disclosure Agreement dated as of the date signed below.I agree to maintain the confidentiality of all proprietary informationdisclosed to me during my engagement with the Company.</p><p>I understand that violation of this agreement may result in legal actionand that I am bound by these terms for a period of five (5) years from thedate of signature.</p>v> class='signature-section'><div class='date-field'> <label>Date:</label> <input type='text' name='signatureDate' /></div><div class='signature-line'></div><div class='signature-label'>Authorized Signature</div>v>;ChromePdfRenderer renderer = new ChromePdfRenderer();renderer.RenderingOptions.CreatePdfFormsFromHtml = true;PdfDocument pdf = renderer.RenderHtmlAsPdf(formHtml);// Add a signature field programmatically// Parameters: name, page index, x position, y position, width, heightSignatureFormField signatureField = new SignatureFormField( "authorizedSignature", // Field name 0, // Page index (first page) 72, // X position in points from left 200, // Y position in points from bottom 250, // Width in points 60 // Height in points);pdf.Form.Add(signatureField);pdf.SaveAs("nda-with-signature.pdf");
using IronPdf;
using IronSoftware.Forms;
// First create the base form using HTML
string formHtml = @"
E html>
le>
body {
font-family: Arial, sans-serif;
max-width: 600px;
margin: 40px auto;
padding: 30px;
}
h1 {
text-align: center;
color: #2c3e50;
}
.agreement-text {
background: #f5f5f5;
padding: 20px;
border-radius: 5px;
margin: 20px 0;
line-height: 1.6;
}
.signature-section {
margin-top: 40px;
padding-top: 20px;
border-top: 1px solid #ddd;
}
.signature-line {
margin-top: 60px;
border-bottom: 1px solid #333;
width: 300px;
}
.signature-label {
font-size: 12px;
color: #666;
margin-top: 5px;
}
.date-field {
margin-top: 20px;
}
.date-field label {
font-weight: bold;
}
.date-field input {
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
width: 150px;
}
yle>
Non-Disclosure Agreement</h1>
class='agreement-text'>
<p>By signing this document, I acknowledge that I have read and understood
the terms of the Non-Disclosure Agreement dated as of the date signed below.
I agree to maintain the confidentiality of all proprietary information
disclosed to me during my engagement with the Company.</p>
<p>I understand that violation of this agreement may result in legal action
and that I am bound by these terms for a period of five (5) years from the
date of signature.</p>
v>
class='signature-section'>
<div class='date-field'>
<label>Date:</label>
<input type='text' name='signatureDate' />
</div>
<div class='signature-line'></div>
<div class='signature-label'>Authorized Signature</div>
v>
;
ChromePdfRenderer renderer = new ChromePdfRenderer();
renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
PdfDocument pdf = renderer.RenderHtmlAsPdf(formHtml);
// Add a signature field programmatically
// Parameters: name, page index, x position, y position, width, height
SignatureFormField signatureField = new SignatureFormField(
"authorizedSignature", // Field name
0, // Page index (first page)
72, // X position in points from left
200, // Y position in points from bottom
250, // Width in points
60 // Height in points
);
pdf.Form.Add(signatureField);
pdf.SaveAs("nda-with-signature.pdf");
ImportsIronPdfImportsIronSoftware.Forms' First create the base form using HTMLDim formHtml AsString = "<!DOCTYPE html><html><head> <style> body { font-family: Arial, sans-serif; max-width: 600px; margin: 40px auto; padding: 30px; } h1 { text-align: center; color: #2c3e50; } .agreement-text { background: #f5f5f5; padding: 20px; border-radius: 5px; margin: 20px 0; line-height: 1.6; } .signature-section { margin-top: 40px; padding-top: 20px; border-top: 1px solid #ddd; } .signature-line { margin-top: 60px; border-bottom: 1px solid #333; width: 300px; } .signature-label { font-size: 12px; color: #666; margin-top: 5px; } .date-field { margin-top: 20px; } .date-field label { font-weight: bold; } .date-field input { padding: 8px; border: 1px solid #ccc; border-radius: 4px; width: 150px; } </style></head><body> <h1>Non-Disclosure Agreement</h1> <div class='agreement-text'> <p>By signing this document, I acknowledge that I have read and understood the terms of the Non-Disclosure Agreement dated as of the date signed below. I agree to maintain the confidentiality of all proprietary information disclosed to me during my engagement with the Company.</p> <p>I understand that violation of this agreement may result in legal action and that I am bound by these terms for a period of five (5) years from the date of signature.</p> </div> <div class='signature-section'> <div class='date-field'> <label>Date:</label> <input type='text' name='signatureDate' /> </div> <div class='signature-line'></div> <div class='signature-label'>Authorized Signature</div> </div></body></html>"Dim renderer As New ChromePdfRenderer()renderer.RenderingOptions.CreatePdfFormsFromHtml = TrueDim pdf AsPdfDocument = renderer.RenderHtmlAsPdf(formHtml)' Add a signature field programmatically' Parameters: name, page index, x position, y position, width, heightDim signatureField As New SignatureFormField( "authorizedSignature", ' Field name 0, ' Page index (first page) 72, ' X position in points from left 200, ' Y position in points from bottom 250, ' Width in points 60 ' Height in points)pdf.Form.Add(signatureField)pdf.SaveAs("nda-with-signature.pdf")
Imports IronPdf
Imports IronSoftware.Forms
' First create the base form using HTML
Dim formHtml As String = "
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
max-width: 600px;
margin: 40px auto;
padding: 30px;
}
h1 {
text-align: center;
color: #2c3e50;
}
.agreement-text {
background: #f5f5f5;
padding: 20px;
border-radius: 5px;
margin: 20px 0;
line-height: 1.6;
}
.signature-section {
margin-top: 40px;
padding-top: 20px;
border-top: 1px solid #ddd;
}
.signature-line {
margin-top: 60px;
border-bottom: 1px solid #333;
width: 300px;
}
.signature-label {
font-size: 12px;
color: #666;
margin-top: 5px;
}
.date-field {
margin-top: 20px;
}
.date-field label {
font-weight: bold;
}
.date-field input {
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
width: 150px;
}
</style>
</head>
<body>
<h1>Non-Disclosure Agreement</h1>
<div class='agreement-text'>
<p>By signing this document, I acknowledge that I have read and understood the terms of the Non-Disclosure Agreement dated as of the date signed below. I agree to maintain the confidentiality of all proprietary information disclosed to me during my engagement with the Company.</p>
<p>I understand that violation of this agreement may result in legal action and that I am bound by these terms for a period of five (5) years from the date of signature.</p>
</div>
<div class='signature-section'>
<div class='date-field'>
<label>Date:</label>
<input type='text' name='signatureDate' />
</div>
<div class='signature-line'></div>
<div class='signature-label'>Authorized Signature</div>
</div>
</body>
</html>"
Dim renderer As New ChromePdfRenderer()
renderer.RenderingOptions.CreatePdfFormsFromHtml = True
Dim pdf As PdfDocument = renderer.RenderHtmlAsPdf(formHtml)
' Add a signature field programmatically
' Parameters: name, page index, x position, y position, width, height
Dim signatureField As New SignatureFormField(
"authorizedSignature", ' Field name
0, ' Page index (first page)
72, ' X position in points from left
200, ' Y position in points from bottom
250, ' Width in points
60 ' Height in points
)
pdf.Form.Add(signatureField)
pdf.SaveAs("nda-with-signature.pdf")
using IronPdf;using System.Collections.Generic;// Load a filled PDF formPdfDocument filledForm = PdfDocument.FromFile("completed-application.pdf");// Extract all form data into a dictionaryvar extractedData = new Dictionary<string, string>();foreach (var field in filledForm.Form){ extractedData[field.Name] = field.Value ?? string.Empty;}// Access extracted data// extractedData.GetValueOrDefault("firstName")// extractedData.GetValueOrDefault("lastName")// extractedData.GetValueOrDefault("email")// extractedData.GetValueOrDefault("department")
using IronPdf;
using System.Collections.Generic;
// Load a filled PDF form
PdfDocument filledForm = PdfDocument.FromFile("completed-application.pdf");
// Extract all form data into a dictionary
var extractedData = new Dictionary<string, string>();
foreach (var field in filledForm.Form)
{
extractedData[field.Name] = field.Value ?? string.Empty;
}
// Access extracted data
// extractedData.GetValueOrDefault("firstName")
// extractedData.GetValueOrDefault("lastName")
// extractedData.GetValueOrDefault("email")
// extractedData.GetValueOrDefault("department")
ImportsIronPdfImportsSystem.Collections.Generic' Load a filled PDF formDim filledForm AsPdfDocument = PdfDocument.FromFile("completed-application.pdf")' Extract all form data into a dictionaryDim extractedData As New Dictionary(OfString, String)()For Each field In filledForm.Form extractedData(field.Name) = If(field.Value, String.Empty)Next' Access extracted data' extractedData.GetValueOrDefault("firstName")' extractedData.GetValueOrDefault("lastName")' extractedData.GetValueOrDefault("email")' extractedData.GetValueOrDefault("department")
Imports IronPdf
Imports System.Collections.Generic
' Load a filled PDF form
Dim filledForm As PdfDocument = PdfDocument.FromFile("completed-application.pdf")
' Extract all form data into a dictionary
Dim extractedData As New Dictionary(Of String, String)()
For Each field In filledForm.Form
extractedData(field.Name) = If(field.Value, String.Empty)
Next
' Access extracted data
' extractedData.GetValueOrDefault("firstName")
' extractedData.GetValueOrDefault("lastName")
' extractedData.GetValueOrDefault("email")
' extractedData.GetValueOrDefault("department")
using IronPdf;// Load and fill the formPdfDocument pdf = PdfDocument.FromFile("contract-template.pdf");pdf.Form.FindFormField("clientName").Value = "Acme Corporation";pdf.Form.FindFormField("contractDate").Value = "January 15, 2025";pdf.Form.FindFormField("contractValue").Value = "$50,000";pdf.Form.FindFormField("paymentTerms").Value = "Net 30";// Make all form fields read-only to prevent further editingforeach (var field in pdf.Form){ field.ReadOnly = true;}// Save the document with locked fieldspdf.SaveAs("contract-acme-signed.pdf");
using IronPdf;
// Load and fill the form
PdfDocument pdf = PdfDocument.FromFile("contract-template.pdf");
pdf.Form.FindFormField("clientName").Value = "Acme Corporation";
pdf.Form.FindFormField("contractDate").Value = "January 15, 2025";
pdf.Form.FindFormField("contractValue").Value = "$50,000";
pdf.Form.FindFormField("paymentTerms").Value = "Net 30";
// Make all form fields read-only to prevent further editing
foreach (var field in pdf.Form)
{
field.ReadOnly = true;
}
// Save the document with locked fields
pdf.SaveAs("contract-acme-signed.pdf");
ImportsIronPdf' Load and fill the formDim pdf AsPdfDocument = PdfDocument.FromFile("contract-template.pdf")pdf.Form.FindFormField("clientName").Value = "Acme Corporation"pdf.Form.FindFormField("contractDate").Value = "January 15, 2025"pdf.Form.FindFormField("contractValue").Value = "$50,000"pdf.Form.FindFormField("paymentTerms").Value = "Net 30"' Make all form fields read-only to prevent further editingFor Each field In pdf.Form field.ReadOnly = TrueNext' Save the document with locked fieldspdf.SaveAs("contract-acme-signed.pdf")
Imports IronPdf
' Load and fill the form
Dim pdf As PdfDocument = PdfDocument.FromFile("contract-template.pdf")
pdf.Form.FindFormField("clientName").Value = "Acme Corporation"
pdf.Form.FindFormField("contractDate").Value = "January 15, 2025"
pdf.Form.FindFormField("contractValue").Value = "$50,000"
pdf.Form.FindFormField("paymentTerms").Value = "Net 30"
' Make all form fields read-only to prevent further editing
For Each field In pdf.Form
field.ReadOnly = True
Next
' Save the document with locked fields
pdf.SaveAs("contract-acme-signed.pdf")
using IronPdf;using System;public class W9FormData{ public stringName { get; set; } public stringBusinessName { get; set; } public stringFederalTaxClassification { get; set; } public stringExemptPayeeCode { get; set; } public stringFatcaExemptionCode { get; set; } public stringAddress { get; set; } public stringCityStateZip { get; set; } public stringAccountNumbers { get; set; } public stringTaxpayerIdNumber { get; set; } public DateTimeSignatureDate { get; set; }}public class W9FormProcessor{ public voidFillW9Form(W9FormData data, string templatePath, string outputPath) { PdfDocument pdf = PdfDocument.FromFile(templatePath); // The W-9 form has specific field names defined by the IRS // These correspond to the official form structure // Line 1: Name as shown on your income tax returnSetFieldIfExists(pdf, "topmostSubform[0].Page1[0].f1_1[0]", data.Name); // Line 2: Business name/disregarded entity nameSetFieldIfExists(pdf, "topmostSubform[0].Page1[0].f1_2[0]", data.BusinessName); // Line 3: Federal tax classification (checkbox selection) // The W-9 uses checkbox fields for classification switch (data.FederalTaxClassification) { case "Individual":SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].FederalClassification[0].c1_1[0]", "1"); break; case "CCorporation":SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].FederalClassification[0].c1_1[1]", "2"); break; case "SCorporation":SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].FederalClassification[0].c1_1[2]", "3"); break; case "Partnership":SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].FederalClassification[0].c1_1[3]", "4"); break; case "LLC":SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].FederalClassification[0].c1_1[5]", "6"); break; } // Line 5: AddressSetFieldIfExists(pdf, "topmostSubform[0].Page1[0].Address[0].f1_7[0]", data.Address); // Line 6: City, state, and ZIP codeSetFieldIfExists(pdf, "topmostSubform[0].Page1[0].Address[0].f1_8[0]", data.CityStateZip); // Part I: Taxpayer Identification Number (SSN or EIN) // For security, typically only last 4 digits are pre-filled or field is left for manual entry if (!string.IsNullOrEmpty(data.TaxpayerIdNumber) && data.TaxpayerIdNumber.Length >= 4) { // TIN left blank for security - user must enter manually } // Signature dateSetFieldIfExists(pdf, "topmostSubform[0].Page1[0].Date[0]", data.SignatureDate.ToString("MM/dd/yyyy")); pdf.SaveAs(outputPath); } private voidSetFieldIfExists(PdfDocument pdf, string fieldName, string value) { var field = pdf.Form.FindFormField(fieldName); if (field != null && !string.IsNullOrEmpty(value)) { field.Value = value; } }}// Usage exampleclass Program{ static voidMain() { var vendorData = new W9FormData {Name = "Johnson Consulting LLC",BusinessName = "",FederalTaxClassification = "LLC",Address = "456 Commerce Street",CityStateZip = "Austin, TX 78701",SignatureDate = DateTime.Today }; var processor = new W9FormProcessor(); processor.FillW9Form(vendorData, "fw9.pdf", "w9-johnson-consulting.pdf"); }}
using IronPdf;
using System;
public class W9FormData
{
public string Name { get; set; }
public string BusinessName { get; set; }
public string FederalTaxClassification { get; set; }
public string ExemptPayeeCode { get; set; }
public string FatcaExemptionCode { get; set; }
public string Address { get; set; }
public string CityStateZip { get; set; }
public string AccountNumbers { get; set; }
public string TaxpayerIdNumber { get; set; }
public DateTime SignatureDate { get; set; }
}
public class W9FormProcessor
{
public void FillW9Form(W9FormData data, string templatePath, string outputPath)
{
PdfDocument pdf = PdfDocument.FromFile(templatePath);
// The W-9 form has specific field names defined by the IRS
// These correspond to the official form structure
// Line 1: Name as shown on your income tax return
SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].f1_1[0]", data.Name);
// Line 2: Business name/disregarded entity name
SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].f1_2[0]", data.BusinessName);
// Line 3: Federal tax classification (checkbox selection)
// The W-9 uses checkbox fields for classification
switch (data.FederalTaxClassification)
{
case "Individual":
SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].FederalClassification[0].c1_1[0]", "1");
break;
case "CCorporation":
SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].FederalClassification[0].c1_1[1]", "2");
break;
case "SCorporation":
SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].FederalClassification[0].c1_1[2]", "3");
break;
case "Partnership":
SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].FederalClassification[0].c1_1[3]", "4");
break;
case "LLC":
SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].FederalClassification[0].c1_1[5]", "6");
break;
}
// Line 5: Address
SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].Address[0].f1_7[0]", data.Address);
// Line 6: City, state, and ZIP code
SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].Address[0].f1_8[0]", data.CityStateZip);
// Part I: Taxpayer Identification Number (SSN or EIN)
// For security, typically only last 4 digits are pre-filled or field is left for manual entry
if (!string.IsNullOrEmpty(data.TaxpayerIdNumber) && data.TaxpayerIdNumber.Length >= 4)
{
// TIN left blank for security - user must enter manually
}
// Signature date
SetFieldIfExists(pdf, "topmostSubform[0].Page1[0].Date[0]",
data.SignatureDate.ToString("MM/dd/yyyy"));
pdf.SaveAs(outputPath);
}
private void SetFieldIfExists(PdfDocument pdf, string fieldName, string value)
{
var field = pdf.Form.FindFormField(fieldName);
if (field != null && !string.IsNullOrEmpty(value))
{
field.Value = value;
}
}
}
// Usage example
class Program
{
static void Main()
{
var vendorData = new W9FormData
{
Name = "Johnson Consulting LLC",
BusinessName = "",
FederalTaxClassification = "LLC",
Address = "456 Commerce Street",
CityStateZip = "Austin, TX 78701",
SignatureDate = DateTime.Today
};
var processor = new W9FormProcessor();
processor.FillW9Form(vendorData, "fw9.pdf", "w9-johnson-consulting.pdf");
}
}
How does IronPDF facilitate extracting data from filled PDF forms?
IronPDF enables you to extract data from filled PDF forms by iterating over form fields and collecting their values into a data structure like a dictionary.
What platforms and frameworks does IronPDF support?
IronPDF supports .NET 10, .NET 8 LTS, .NET Framework 4.6.2+, and .NET Standard 2.0, ensuring flexibility across various development environments.