HelpBot Assistant

How can I help you?

PdfFieldActions

6 Feb 20263 minutes to read

Represents actions to be performed as response to field events.
```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);
// Get the pdf field actions
let fieldActions: PdfFieldActions = field.actions;
// Save the document
document.save(‘output.pdf’);
// Destroy the document
document.destroy();

Properties

Get gotFocus PdfAction

Get the action to be performed when the field receives the input focus.

Set gotFocus void

Set the action to be performed when the field receives the input focus.

Parameter Type Description
value PdfAction The action to be executed when the field receives the input focus.

Get lostFocus PdfAction

Get the action to be performed when the field loses the input focus.

Set lostFocus void

Set the action to be performed when the field loses the input focus.

Parameter Type Description
value PdfAction The action to be executed when the field loses the input focus.

Get mouseDown PdfAction

Get the action to be performed when the mouse button is pressed inside the field’s area.

Set mouseDown void

Set the action to be performed when the mouse button is pressed inside the field’s area.

Parameter Type Description
value PdfAction The action to be executed when the mouse button is pressed inside the field area.

Get mouseEnter PdfAction

Get the action to be performed when the mouse cursor enters the field area.

Set mouseEnter void

Set the action to be performed when the mouse cursor enters the field area.

Parameter Type Description
value PdfAction The action to be executed when the mouse enters the field area.

Get mouseLeave PdfAction

Get the action to be performed when the cursor exits the fields area.

Set mouseLeave void

Set the action to be performed when the cursor exits the fields area.

Parameter Type Description
value PdfAction The action to be executed when the mouse exists the field area.

Get mouseUp PdfAction

Get the action to be performed when the mouse button is released inside the field area.

Set mouseUp void

Set the action to be performed when the mouse button is released inside the field area.

Parameter Type Description
value PdfAction The action to be executed when the mouse released inside the field area.