The class provides methods and properties to handle the collection of PdfAnnotation
.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Access annotation coolection from first page
let annotations: PdfAnnotationCollection = document.getPage(0).annotations;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
number
Gets the annotation count (Read only).
Add a new PdfAnnotation
into the collection.
Parameter | Type | Description |
---|---|---|
annotation | PdfAnnotation |
Annotation to add. |
Returns number
Gets the PdfAnnotation
at the specified index.
Parameter | Type | Description |
---|---|---|
index | number |
Field index. |
Returns PdfAnnotation
Remove an annotation from the collection.
Parameter | Type | Description |
---|---|---|
annotation | PdfAnnotation |
Annotation to remove. |
Returns void
Remove an annotation from the collection at the specified index.
Parameter | Type | Description |
---|---|---|
index | number |
Annotation index. |
Returns void