PDF .Net supports filling in a PDF interactive form and it automatically updates the appearance of the filled in fields.
Various types of form fields, such as text, radio button, check box, combo box, and list box can be filled in uniformly, using the PdfField.Value property, as shown in the following example.
using System;
using SautinSoft.Pdf;
using System.IO;
class Program
{
static void Main()
{
// This property is necessary only for licensed version.
//SautinSoft.Pdf.Serial = "XXXXXXXXXXX";
using (var document = PdfDocument.Load("Form.pdf"))
{
document.Form.Fields["FullName"].Value = "Jane Doe";
document.Form.Fields["ID"].Value = "0123456789";
document.Form.Fields["Gender"].Value = "Female";
document.Form.Fields["Married"].Value = "Yes";
document.Form.Fields["City"].Value = "Berlin";
document.Form.Fields["Language"].Value = new string[] { "German", "Italian" };
document.Form.Fields["Notes"].Value = "Notes first line\rNotes second line\rNotes third line";
document.Save("FormFilled.pdf");
}
}
}
If you need a new code example or have a question: email us at support@sautinsoft.com or ask at Online Chat (right-bottom corner of this page) or use the Form below: