Pdf - PdfActionDestination

18 Nov 20261 minute to read

Public enum to define the predefined navigation destination of a PdfNamedAction.

// Create a new PDF document
let document: PdfDocument = new PdfDocument();
// Access the first page
let page: PdfPage = document.addPage();
// Create a named action that navigates to the first page
let namedAction: PdfNamedAction = new PdfNamedAction(PdfActionDestination.FirstPage);
// Assign the action to the page open event
page.actions.open = namedAction;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
  • FirstPage - Specifies the type of FirstPage.
  • LastPage - Specifies the type of LastPage.
  • NextPage - Specifies the type of NextPage.
  • PrevPage - Specifies the type of PrevPage.