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

NameTypeAccessDescription
DestinationAnnotations.IAppointment?Read/WriteThe destination this action points to.
DestinationPageIndexintReadThe destination page number (0-based), or -1 if not resolved.
FitTypestring?ReadThe fit type of the destination (e.g., “Fit”, “FitH”, “XYZ”).
TypeActionTypeReadThe action type.
NextAnnotations.ActionCollectionReadThe /Next chain — actions that fire after this one.

Methods

SignatureDescription
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.

See Also