Represents the collection of PdfPopupAnnotation
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Access annotation collection from first page
let annotations: PdfRectangleAnnotation = document.getPage(0).annotations;
// Gets the comments of annotation
let comments: PdfPopupAnnotationCollection = annotation.comments;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
Add a new popup annotation into the collection
Parameter | Type | Description |
---|---|---|
annotation | PdfPopupAnnotation |
Annotation to add |
Returns void
Remove an annotation from the collection
Parameter | Type | Description |
---|---|---|
annotation | PdfPopupAnnotation |
Annotation to remove |
Returns void
Remove an annotation from the collection at the specified index
Parameter | Type | Description |
---|---|---|
index | number |
Annotation index to remove |
Returns void