How can I help you?
PdfGoToAction
6 Feb 20261 minute to read
Represents an action which goes to a destination in the current document.
```typescript
// 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);
// Set the goto action to the button
field.actions.mouseEnter = gotoAction;
// Save the document
document.save(‘output.pdf’);
// Destroy the document
document.destroy();
Properties
Get destination PdfDestination
Get the destination to be navigated.
Set destination void
Set the destination to be navigated.
| Parameter | Type | Description |
|---|---|---|
| value | PdfDestination |
The destination to be navigated. |
Get next PdfAction
Get the next action to be performed after the action represented by this instance.
Set next void
Set the next action to be performed after the action represented by this instance.
| Parameter | Type | Description |
|---|---|---|
| value | PdfAction |
The next action to be executed. |