Web SDKv1.0.0

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

ParameterTypeDescription
idstringThe annotation's id, as list() or create() gave it.

Returns

Promise<AnnotationInfo | null>

Throws

  • INVALID_ARGUMENT — an id that 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);

More in AnnotationsApi