PdfDestinationMode
12 Sep 20251 minute to read
Public Enum to define destination mode of document link annotation.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Access first page
let page: PdfPage = document.getPage(0);
// Access the annotation at index 0
let annotation: PdfDocumentLinkAnnotation = page.annotations.at(0) PdfDocumentLinkAnnotation;
// Sets the destination mode as fitToPage
annotation.destination.mode = PdfDestinationMode.fitToPage;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();-
fitH- Specifies the intent offitH. -
fitR- Specifies the intent offitR. -
fitToPage- Specifies the intent ofFitToPage. -
location- Specifies the default intent oflocation.