annotation object is an instance accessible from the main MuPDFWebViewer instance as follows:
This assumes you have returned your instance name as
webViewer from the initMuPDFWebViewer() promise!annotation
Theannotation object has the following methods:
remove
Parameters
object
required
The configuration object.
Returns
Promise
required
A Promise.
get
Parameters
object
Optional configuration. If omitted, returns all annotations for all pages.
Returns
Promise<{ annotations: Annotation[] }>
required
A Promise that resolves to an object containing an
Annotation[] array.The
Annotation[] array contains annotation objects, also see the Working with Annotations guide.add
Parameters
object
required
The configuration object.
Returns
Promise<{ annotations: Annotation[] }>
required
A Promise that resolves to an object containing an
Annotation[] array.The
Annotation[] array contains annotation objects, also see the Working with Annotations guide.set
Parameters
object
required
The configuration object.
The
Annotation[] array contains annotation objects, also see the Working with Annotations guide.undo
Returns
Promise<{ success: boolean; }>
required
A Promise that resolves to a success status.
redo
Returns
Promise<{ success: boolean; }>
required
A Promise that resolves to a success status.
Annotation Object
TheAnnotation object type: