/ PDF / PdfAction
Search results

PdfAction API in JavaScript PDF API control

Represents base class for all action types.

// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Access button field
let field: PdfButtonField = document.form.fieldAt(0) as PdfButtonField;
// Access the second page
let secondPage: PdfPage = document.getPage(2);
// Create a PdfDestination for the specified page
let destination: PdfDestination = new PdfDestination(secondPage)
// Create a new PdfGoToAction with the specified destination
let gotoAction: PdfGoToAction = new PdfGoToAction(destination);
// Get the GoTo action to the mouse enter property of the button field
let pdfAction: PdfAction = field.actions.mouseEnter;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();

## Properties

### next [`PdfAction`](./pdfAction)

Get the next action to be performed after the action represented by this instance.
Contents
Contents