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

DynaPDF Manual - Page 108

Previous Page 107   Index   Next Page 109

Function Reference
Page 108 of 750
oeOnKeyStroke,
// Text fields only
oeOnFormat,
// Text fields only
oeOnCalc,
// Text fields, combo boxes, list boxes
oeOnValidate,
// All form fields, except buttons
oeOnPageVisible,
// PDF 1.5 -> Form fields only
oeOnPageInVisible, // PDF 1.5 -> Form fields only
oeOnPageOpen,
// PDF 1.5 -> Form fields only
oeOnPageClose,
// PDF 1.5 -> Form fields only
oeOnBeforeClosing, // PDF 1.4 -> Catalog, must be a JavaScript Action
oeOnBeforeSaving,
// PDF 1.4 -> Catalog, must be a JavaScript Action
oeOnAfterSaving,
// PDF 1.4 -> Catalog, must be a JavaScript Action
oeOnBeforePrinting,// PDF 1.4 -> Catalog, must be a JavaScript Action
oeOnAfterPrinting
// PDF 1.4 -> Catalog, must be a JavaScript Action
}TObjEvent;
This function adds an action to a PDF object. The parameter ActHandle requires a handle that was
returned by a function that creates an action object such as CreateGoToAction(), etc. The object
handle is also a return value of its creation function. If the object type is a page, then use the page
number as handle.
It is possible to add multiple actions to one object, but note that DynaPDF does not check whether all
actions are valid. For example, it is possible to add more than one action to a text field to the
OnFormat event, but Acrobat executes only the first one. Always test your actions with different
Acrobat versions because each version handles actions in a different manner.
The OnMouseUp event is the standard event supported by all objects. This event type supports also
all action types. The other events are handled differently depending on the Acrobat version. Acrobat
4 supports JavaScript actions only in non-OnMouseUp events. Newer versions support also
predefined action types. However, test your forms with the Acrobat versions that should be
supported - this is the only way to find incompatibilities.
Return values:
If the function succeeds the return value is 1, if the function fails the return value is 0.
AddAnnotToPage
Syntax:
LBOOL pdfAddAnnotToPage(
const PPDF* IPDF, // Instance pointer
UI32 PageNum,
// Page number
UI32 Handle)
// Annotation handle
The function adds an annotation to a page. With exception of PopUp annotations all annotation
types can be drawn on multiple pages. Watermark or Stamp annotations are typical annotations
which can be placed on multiple pages.
Return values:
If the function succeeds the return value is 1, if the function fails the return value is 0.
 

Previous topic: AddActionToObj

Next topic: AddBookmark