DynaPDF Manual - Page 355

Previous Page 354   Index   Next Page 356

Function Reference
Page 355 of 839
The function is able to create appearance streams for most annotation types but not all. Missing
appearance streams of 3D, Movie, RichMedia, Redact, PrinterMark, Projection, and Screen
annotations cannot be created on demand.
If form fields should be flattened too then it is usually best to flatten the print state (default) since
push puttons, for example, are usually excluded from printing.
Return values:
If the function succeeds the return value is the number of annotations which are still in memory. If
the function fails the return value is a negative error code.
SI32 pdfFlattenForm(
const PPDF* IPDF) // Instance pointer
The function draws all form fields on the corresponding pages and deletes the form fields, incl.
corresponding JavaScripts and JavaScript actions. The resulting PDF pages look after flattening as if
the form were printed.
Note that this function does not support XFA forms. If the form is a hybrid form, the PDF form
fields will be flattened. A maybe existing XFA form will be deleted but not flattened.
Fields, which are invisible for printing, due to an absent print flag, or if the hidden flag was set, are
excluded from flattening. These fields are deleted without drawing them on the page.
This function is especially useful if a large amount of Interactive Forms (which are already filled out
by the user) should be prepared for printing, or if the forms should be archived without allowing
further changes. Flattened forms require less disk space and can be printed faster.
Annotations and form fields can be flattened with FlattenAnnots(). This function preserves also the
z-order of annotations and form fields. This is not possible when flatting form fields and
annotations separetly.
Pure XFA Forms which are created by Adobe's Designer are not supported. Only hybrid forms can
be flatted.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.

Previous topic: FlattenAnnots

Next topic: FlushPageContent, FlushPages