This function flattens a document's AcroForm fields into its page content.
Flattening form fields refers to the process of converting user-interactive field widget annotations into static page content. After flattening the fields, the interactive representation of the form is removed from the document.
Declaration:
AT_ERRCOUNT ACCUAPI IG_PDF_doc_form_flatten(
HIG_PDF_DOC hDoc,
AT_INT flattenMode,
);
Arguments:
Name |
Type |
Description |
hDoc |
HIG_PDF_DOC |
The document which fields are flattened on. |
flattenMode |
AT_INT |
One of enumIGPDFFlattenMode, which specifies if flattening is done for screen or printer viewing. See remarks below. |
Return Value:
Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.
This function does not process image pixels.
The visibility of each of the field after flattening depends on whether the HIDDEN, PRINT or NOVIEW flags are set in the field's widget annotations. These will be respected during flattening.
- An annotation with a
HIDDEN
flag will never appear on the page.
- An annotation with a
NOVIEW
flag will not appear on the page if AT_PDF_FLATTENMODE_SCREEN
is specified in the flatten method calls.
- An annotation without a
PRINT
flag will not appear on the page if AT_PDF_FLATTENMODE_PRINTER
is specified.
Flattening a signature field removes all visual information.