PDF Annotation Statuses

The annotation statuses/states provide a built-in way to create review and approval workflows. The default states are: Accepted, Rejected, Cancelled, Completed, and None. Those are part of PDF Specification and the reason they were chosen as default. However, it is possible to change them and set yours.

Apryse Docs Image

Programmatically update annotation state

We can set the annotation state programmatically by calling updateAnnotationState.

1WebViewer(...)
2 .then(instance => {
3 const { documentViewer, annotationManager, Annotations } = instance.Core;
4
5 documentViewer.addEventListener('annotationsLoaded', () => {
6 const annotList = annotationManager.getAnnotationsList();
7 const annot = annotList[0];
8 annotationManager.updateAnnotationState(annot, 'Completed');
9 });
10 });

Customizing states

If the current set of annotation states does not work for you, you can update them by modifying annotation states. You just need to edit the highlighted portion.

Apryse Docs Image

After you are satisfied with the changes, you can follow the guide on how to update your version of WebViewer UI.

Relevant APIs

updateAnnotationState
To update annotation state.

getState
To get annotation state.

getStateModel
To get annotation state model.

setState
To set annotation state.

setStateModel
To set annotation stateModel.

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales