PDFium Delphi Component Docs

PerformNamedAction method

Component: TPdf  ·  Unit: PDFium
Carry out a named action the way a viewer would when a document raises one.

Syntax

function PerformNamedAction(const ActionName: string): Boolean;

ActionNamestring. Name of the action, as written in the document. The four standard navigation names are NextPage, PrevPage, FirstPage, and LastPage.
ResultBoolean. True when the action was recognised and carried out, False for an empty name, an inactive document, or a name with no library-supplied meaning.

Description

Named actions (ISO 32000-1 12.6.4.11) are how a document asks the viewer to do something rather than describing it itself. An OpenAction or a form button can raise one, and this executes it

The four navigation names move PageNumber. Movement is clamped rather than wrapped: a document asking for NextPage on the last page stays put instead of jumping back to the first

Anything else is document-defined and returns False, so a caller can tell "did nothing" from "moved". To take the standard names over as well, handle OnNamedAction

See Also

OnNamedAction, PageNumber, JavaScriptActions, Destination