GdPicture.NET.14.API
GdPicture14 Namespace / GdPicturePDF Class / FlattenFormFields Method / FlattenFormFields(Int32) Method
The page number for flattening form fields included within this page.
Example





In This Topic
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
'Declaration
 
Public Overloads Function FlattenFormFields( _
   ByVal PageNo As Integer _
) As GdPictureStatus
public GdPictureStatus FlattenFormFields( 
   int PageNo
)
public function FlattenFormFields( 
    PageNo: Integer
): GdPictureStatus; 
public function FlattenFormFields( 
   PageNo : int
) : GdPictureStatus;
public: GdPictureStatus FlattenFormFields( 
   int PageNo
) 
public:
GdPictureStatus FlattenFormFields( 
   int PageNo
) 

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.

Remarks
This method is only allowed for use with non-encrypted documents.
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