Web SDKv1.0.0

PDFViewer.commentPermissions()

What the user may do to a comment by the panel's rules — { reply, setStatus, edit, delete }; null when no comment has that id (none, or a link, form field, pop-up or hidden annotation).
methodComments and panelssince 1.0.0

Signature

commentPermissions(id: string): Promise<CommentPermissions | null>

Parameters

ParameterTypeDescription
idstringThe comment's id.

Returns

Promise<CommentPermissions | null> { reply, setStatus, edit, delete }, each a boolean.

Throws

  • INVALID_STATE after destroy().

Example

TypeScript
const may = await viewer.commentPermissions(id);
deleteButton.hidden = may?.delete !== true;

More in PDFViewer