DynaPDF Manual - Page 115

Previous Page 114   Index   Next Page 116

Function Reference
Page 115 of 787
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: Function Reference, Abort (Rendering Engine), AddActionToObj

Next topic: AddArticle, AddBookmark

Start Chat