Back to Blog
Developer Blog
How to flatten an individual form field using Foxit PDF .NET SDKs
Foxit SDK .NET
The following examples demonstrates how to flatten an individual form field within a PDF:
Using Visual Basic:
Dim document As MergeDocument = New MergeDocument("C:\AcroForm.pdf") document.Form.Fields(0).Output = FormFieldOutput.Flatten document.Draw(@"C:\AcroForm_Flattened.pdf");
Using C#:
MergeDocument document = new MergeDocument(@"C:\AcroForm.pdf"); document.Form.Fields[0].Output = FormFieldOoutput.Flatten; document.Draw(@"C:\AcroForm_Flattened.pdf");