DynaPDF Manual - Page 319

Previous Page 318   Index   Next Page 320

Function Reference
Page 319 of 770
It is safe to delete a found bookmark with DeleteBookmark() and to continue the search run.
Return values:
If a bookmark can be found the return value is the bookmark handle, a value greater or equal zero. If
no bookmark can be found the return value is -1. This function cannot fail; other return values are
LBOOL pdfFinishSignature(
const PPDF* IPDF,
// Instance pointer
const void* PKCS7Obj, // PKCS#7 object buffer
UI32 Length)
// Length of the PKCS#7 object in bytes
The function writes the PKCS#7 signature object to the PDF file and writes finally the finish PDF file
to disk and frees all used resources if the file was not created in memory. If the file was created in
memory GetBuffer() can now be called to obtain the finish PDF buffer.
CloseAndSignFileExt() must be called prior this function can be called.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
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 all annotations which are unsupported in PDF/A 1.
#define affNonPDFA_2
0x00000008 // Flatten all 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 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.
The function draws all 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: FindField, FindLinkAnnot, FindNextBookmark

Next topic: FlattenForm