redaction 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!redaction
Theredaction object has the following methods:
get
Parameters
Returns
A Promise that resolves to an object containing
redactions.Note: if redactions have been previously applied then these redactions are permanent and, as we should expect, will not be returned!Use
result.redactions to access the redaction array.set
Parameters
Use this method to update existing redactions by unique identifier.
add
Parameters
remove
Parameters
Each redaction item must includeoid, name, and pageIndex. Matching redactions are removed.
apply
Parameters
Each redaction item must includeoid, name, and pageIndex. Matching redactions are applied.