NamedAction
Overview
NamedAction is a class in Aspose.PDF FOSS for .NET.
Inherits from: PdfAction.
NamedAction.CreateUri(uri) builds a URI action that can be linked to from annotations or form fields.
This class provides 8 methods for working with NamedAction objects in .NET programs.
Available methods include: CreateGoTo, CreateJavaScript, CreateLaunch, CreateNamed, CreateUri, GetECMAScriptString, NamedAction, ToString.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: Name, Next, Type.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Name | string | Read/Write | Named action name (/N entry). |
Type | ActionType | Read | The action type. |
Next | Annotations.ActionCollection | Read | The /Next chain โ actions that fire after this one. |
Methods
| Signature | Description |
|---|---|
NamedAction(action: Annotations.PredefinedAction) | Construct from a predefined viewer action (PDF 32000 ยง12.6.4.11). |
GetECMAScriptString() | For JavaScript actions, returns the embedded script; otherwise an empty string. |
CreateGoTo(pageIndex: int, fitType: string) | Create a GoTo action targeting a page index with the specified fit type. |
CreateUri(uri: string) | Create a URI action that opens the specified URL. |
CreateJavaScript(script: string) | Create a JavaScript action that executes the specified script. |
CreateNamed(name: string) | Create a Named action (e.g., NextPage, PrevPage, FirstPage, LastPage). |
CreateLaunch(filePath: string) | Create a Launch action that opens the specified file. |
ToString() | Human-readable representation of this appointment target. |