GoToAction
Overview
GoToAction is a class in Aspose.PDF FOSS for .NET.
Inherits from: PdfAction.
This class provides 13 methods for working with GoToAction objects in .NET programs.
Available methods include: CreateGoTo, CreateJavaScript, CreateLaunch, CreateNamed, CreateUri, GetECMAScriptString, GoToAction, ToString.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: Destination, DestinationPageIndex, FitType, Next, Type.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Destination | Annotations.IAppointment? | Read/Write | The destination this action points to. |
DestinationPageIndex | int | Read | The destination page number (0-based), or -1 if not resolved. |
FitType | string? | Read | The fit type of the destination (e.g., “Fit”, “FitH”, “XYZ”). |
Type | ActionType | Read | The action type. |
Next | Annotations.ActionCollection | Read | The /Next chain — actions that fire after this one. |
Methods
| Signature | Description |
|---|---|
GoToAction(destination: Annotations.ExplicitDestination) | Create a GoTo action targeting the given explicit destination. |
GoToAction(page: Page) | Create a GoTo action targeting the first view of the given page. |
GoToAction(page: int) | Create a GoTo action targeting the page at the given 1-based page number. |
GoToAction() | Create an empty GoTo action. |
GoToAction(doc: Document, name: string) | Named-destination GoTo action (/D entry is a /name). |
GoToAction(page: Page, type: Annotations.ExplicitDestinationType, values: double[]) | Direct GoTo action with an explicit destination type and value array. |
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. |