Web SDKv1.0.0

AnnotationsApi.comments()

The page's comments as CommentThread[] (every page's, in page order, without pageIndex): each markup annotation with its replies, its reviewers' latest statuses and the latest status. Links, form fields, pop-ups and hidden comments are left out. Contents and authors are blank as list() blanks them without extract. Needs no feature.
methodCommentssince 1.0.0

Signature

comments(pageIndex?: number): Promise<CommentThread[]>

Parameters

ParameterTypeDescription
pageIndex?numberZero-based page index. Omit for every page's, in page order.

Returns

Promise<CommentThread[]> Each { comment, replies, statuses, status }: the annotation commented on, its replies (replies to replies included, oldest first), each reviewer's latest status entry (oldest first) and the latest status any reviewer set, or null.

Throws

  • INVALID_ARGUMENT — a page index out of range.
  • DOCUMENT_CLOSED — the document has been closed.

Example

TypeScript
for (const thread of await doc.annotations.comments()) {
  console.log(thread.comment.author, thread.replies.length, 'replies', thread.status);
}

More in AnnotationsApi