DynaPDF Manual - Page 343

Previous Page 342   Index   Next Page 344

Function Reference
Page 343 of 818
Remarks:
Annotations and form fields are stored in the same array but handled differently depending on the
function that is used to enumerate them. GetPageFieldEx() / GetPageFieldCount() use a pseudo
indexing scheme by skipping regular annotations between form fields (Widget Annotations).
In order to access a form field with GetPageField() or GetPageFieldEx(), the function must be
informed that an annotation index is passed to the function. This can be achieved by combining the
array index with the flag PDF_ANNOT_INDEX as follows (i represents the array index):
C/C++: pdfGetPageFieldEx(pdf, i | PDF_ANNOT_INDEX, &f);
VB 6:
Call pdf.GetPageFieldEx(i Or PDF_ANNOT_INDEX, f)
VB .Net: pdf.GetPageFieldEx(i Or CPDF.PDF_ANNOT_INDEX, f)
C#:
pdf.GetPageFieldEx(Convert.ToInt32(i | CPDF.PDF_ANNOT_INDEX), ref f);
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
FlattenAnnots
Syntax:
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
#define affNonPDFA_1
0x00000004 // Flatten annotations which are unsupported in PDF/A 1.
#define affNonPDFA_2
0x00000008 // Flatten annotations which are unsupported in PDF/A 2/3.
#define affFormFields
0x00000010 // If set, form fields will be flattened too.
#define affUseFieldViewState
0x00000020 // Meaningful only if affFormFields is set. If set, flatten
// the view state of form fields. Use the print state
// otherwise.
#define affSigFields
0x00000040 // Meaningful only if affFormFields is not set. If set,
// signed signature fields will be flattened.
#define affKeepLinkAnnots
0x00001000 // If set, link annotations will be kept.
#define affKeepFileAttach
0x00002000 // If set, file attachment annotations will be kept.
#define affKeepTextAnnots
0x00004000 // If set, text annotations will be kept.
#define affPreserveZOrder
0x00400000 // If set, preserve the z-order under any curcumstances.
That
// means visible overlapping annotations or form fields will
// be flattened, regardless the type.
#define affKeepEmptySigFields 0x00008000 // If set, signature fields which are not already signed
will
// be kept.
The function draws annotations and optionally form fields 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 kinds of 3D, link, and sound annotations, for
example).
 

Previous topic: FindNextBookmark, FinishSignature, FlattenAnnotOrField

Next topic: FlattenForm


Start Chat