Pdf - Pdf3DActivationMode

18 Nov 20261 minute to read

Public enum to define the activation 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 activation mode to explicit activation
annotation3D.activationMode = Pdf3DActivationMode.ExplicitActivation;
// Add the annotation to the page
page.annotations.add(annotation3D);
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
  • ExplicitActivation - Specifies the type of explicitActivation.
  • PageOpen - Specifies the type of pageOpen.
  • PageVisible - Specifies the type of pageVisible.