FlattenFormFields(Int32) Method
In This Topic
Flattens all form fields available within the specified page in the currently loaded PDF document.
Flattening form fields means removing the form field objects from the document's internal structure and placing their data within the PDF document as regular items, so the previously defined form fields are no longer fillable or available for user's interaction.
Syntax
Parameters
- PageNo
- The page number for flattening form fields included within this page.
Return Value
A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.
We strongly recommend always checking this status first.
Example
Flattening form fields on the first page of the current document.
Using gdpicturePdf As GdPicturePDF = New GdPicturePDF()
gdpicturePDF.LoadFromFile("document.pdf", True)
gdpicturePDF.FlattenFormFields(1)
gdpicturePDF.SaveToFile("document.pdf")
End Using
using (GdPicturePDF gdpicturePdf = new GdPicturePDF())
{
gdpicturePDF.LoadFromFile("document.pdf", true);
gdpicturePDF.FlattenFormFields(1);
gdpicturePDF.SaveToFile("document.pdf");
}
Example
Flattening form fields on the first page of the current document.
Using gdpicturePdf As GdPicturePDF = New GdPicturePDF()
gdpicturePDF.LoadFromFile("document.pdf", True)
gdpicturePDF.FlattenFormFields(1)
gdpicturePDF.SaveToFile("document.pdf")
End Using
using (GdPicturePDF gdpicturePdf = new GdPicturePDF())
{
gdpicturePDF.LoadFromFile("document.pdf", true);
gdpicturePDF.FlattenFormFields(1);
gdpicturePDF.SaveToFile("document.pdf");
}
See Also