Pdf - Pdf3DDeactivationMode
18 Nov 20261 minute to read
Public enum to define the deactivation modes for a PDF 3D annotation.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Access the first page
let page: PdfPage = document.getPage(0) as PdfPage;
// Create a 3D annotation with U3D data
let annotation3D: Pdf3DAnnotation = new Pdf3DAnnotation(page, {x: 50, y: 350, width: 200, height: 200});
// Set the deactivation mode to explicit deactivation (user click)
annotation3D.deactivationMode = Pdf3DDeactivationMode.ExplicitDeactivation;
// Add the annotation to the page
page.annotations.add(annotation3D);
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();-
ExplicitDeactivation- Specifies the type ofexplicitDeactivation. -
PageClose- Specifies the type ofpageClose. -
PageInvisible- Specifies the type ofpageInvisible.