PdfDestination class represents the PDF destination.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Access the annotation at index 0
let annotation: PdfDocumentLinkAnnotation = document.getPage(0).annotations.at(0) as PdfDocumentLinkAnnotation;
// Initializes a new instance of the `PdfDestination` class.
let destination: PdfDestination = new PdfDestination();
// Sets the zoom factor.
destination.zoom = 20;
// Sets the page where the destination is situated.
destination.page = page;
// Sets the mode of the destination.
destination.mode = PdfDestinationMode.fitToPage;
// Sets the location of the destination.
destination.location = [20, 20];
// Sets the bounds of the destination.
destination.destinationBounds = [20, 20, 100, 50];
// Sets destination to document link annotation.
annotation.destination = destination;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();number[]Gets the bounds of the destination.
booleanGets a value indicating whether this instance is valid (Read only).
number[]Gets the location of the destination.
PdfDestinationModeGets the mode of the destination.
PdfPageGets the page where the destination is situated.
numberGets the page index of bookmark destination (Read only).
numberGets the zoom factor.