PdfAction

Overview

PdfAction is a class in Aspose.PDF FOSS for .NET. Inherits from: IAppointment.

Base class for PDF actions.

This class provides 8 methods for working with PdfAction objects in .NET programs. Available methods include: CreateGoTo, CreateJavaScript, CreateLaunch, CreateNamed, CreateUri, GetECMAScriptString, ToString. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Next, Type.

Properties

NameTypeAccessDescription
TypeActionTypeReadThe action type.
NextAnnotations.ActionCollectionReadThe /Next chain — actions that fire after this one.

Methods

SignatureDescription
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.
CreateGoTo(pageIndex: int, left: double?, top: double?, zoom: double?)Create a GoTo action targeting a page with XYZ fit (specific position and zoom).
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