AnnotationsApi.get()
The annotation with that id, wherever it sits now, as
AnnotationInfo, or null — the way to keep hold of one across saves, deletions and other readers. A miss reads every page. Words blanked as list() blanks them without extract. Needs no feature.methodAnnotationssince 1.0.0
Signature
get(id: string): Promise<AnnotationInfo | null>
Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | The annotation's id, as list() or create() gave it. |
Returns
Promise<AnnotationInfo | null>
Throws
INVALID_ARGUMENT— anidthat is not a non-empty string.DOCUMENT_CLOSED— the document has been closed.
Example
TypeScript
const note = await doc.annotations.get(id); if (note) console.log(note.pageIndex, note.contents);