Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 312

Previous Page 311   Index   Next Page 313

Function Reference
Page 312 of 750
SI32 pdfFlattenAnnots(
const PPDF* IPDF,
// Instance pointer
TAnnotFlattenFlags Flags) // See below
typedef UI32 TAnnotFlattenFlags;
#define affNone
0x00000000 // Printable annotations
#define affUseViewState 0x00000001 // Visible annotations
#define affMarkupAnnots 0x00000002 // Markup annotations only
The function draws all annotations according to the used flags on the corresponding pages and
deletes the annotations when finish. The flatten flags can be combined. The flag affMarkupAnnots
causes that non-markup annotations will be left intact (all kind of link, sound, and file attach
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.
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.
Pure XFA Forms which are created by Adobe's Designer are not supported. Only hybrid forms can
be flatted.

Previous topic: FinishSignature

Next topic: FlushPages