redaction
object is an instance accessible from the main mupdfwv.MuPDFWebViewer instance as follows:
mupdf
from the initMuPDFWebViewer() promise!redaction
object has the following methods:
get(config?: { textData: mupdf.refs.redaction.textDataOption })
Returns array of (unapplied) redactions for the document.
Promise<Redaction[]>
.Redaction[]
array is an array of redaction objects.set(config: { redactions: Redaction[] })
Updates redactions.
Redaction[]
array is an array of redaction objects.add(config: { redactions: Redaction[] })
Adds redactions.
remove(config: { redactions: Redaction[] })
Removes redactions.
oid
or name
and pageIndex
for the unique key. Then the redaction will be removed.
apply(config: { redactions: Redaction[] })
Applies redactions.
oid
or name
and pageIndex
for the unique key. Then the redaction will be applied.
Redaction
object is a JSON object as follows:
oid
(required): Object idpageIndex
(required): Page indexname
(required): Unique name in the pagerect
(optional): Rectangle { top: number, left: number, bottom: number, right: number }
opacity
(optional): Opacity (0.0 ~ 1.0)author
(optional): AuthorcanBePrinted
(optional): Whether to be printedlocked
(optional): Whether to be lockedoid
or name
and pageIndex
as the unique key. Then the property will be updated.