property OnNamedAction: TPdfNamedActionEvent;
| Sender | TObject. The TPdf instance raising the event |
| ActionName | string. Name of the requested action, such as NextPage or an application-defined name |
| Handled | Boolean. Set to True to suppress the default behaviour for that name |
Fires when a document-raised action reaches the component - from an OpenAction, a form button, or a script. The four standard navigation names move PageNumber by default
Assign the event and set Handled to True to take a name over: a host that owns its own navigation, for example, can scroll its viewer rather than letting the page number jump
Names the library does not act on also arrive here, which is how an application implements document-defined actions of its own
procedure TForm1.PdfNamedAction(Sender: TObject;
const ActionName: string; var Handled: Boolean);
begin
if ActionName = 'Print' then
begin
ShowPrintDialog;
Handled := True;
end;
end;