AnnotationsApi.delete()
Removes the annotation with that id, with its pop-up (listed as
other) and every reply and review status that answers it, which may sit anywhere on the page; their ids are gone with them. Needs the annotations feature, and forms too for a form field's widget.methodAnnotationssince 1.0.0
Signature
delete(id: string, options?: SignedDocumentOptions): Promise<void>
Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | The annotation's id. |
| options? | SignedDocumentOptions | { invalidateSignatures? }. |
Returns
Promise<void>
Throws
INVALID_ARGUMENT— an id no annotation has.PAGE_ERROR— the annotation could not be removed.FEATURE_NOT_LICENSED— the license lacksannotations(orforms, for a form field's widget).DOCUMENT_CLOSED— the document has been closed.INVALID_STATE— a certified document whose certification forbids it, unlessoptions.invalidateSignatures; or a progressive document still downloading.
Example
TypeScript
await doc.annotations.delete(id);