/ PDF / PdfPopupAnnotationCollection
Search results

PdfPopupAnnotationCollection API in JavaScript PDF API control

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();

Methods

add

Add a new popup annotation into the collection

Parameter Type Description
annotation PdfPopupAnnotation Annotation to add

Returns void

remove

Remove an annotation from the collection

Parameter Type Description
annotation PdfPopupAnnotation Annotation to remove

Returns void

removeAt

Remove an annotation from the collection at the specified index

Parameter Type Description
index number Annotation index to remove

Returns void