Some test text!

Loading...
Guides
Setup

Setting up redaction in WebViewer

When creating a new instance of WebViewer, the enableRedaction property needs to be set to true for users to create new redactions and the fullAPI or webviewerServerURL properties need to be setup to be able to apply redactions. It's possible to use redactions with only enableRedaction, but users won't be able to apply redactions.

WebViewer({
  ... // other options
  fullAPI: true,
  // can also use 'webviewerServerURL' instead of 'fullAPI'
  // webviewerServerURL: 'https://demo.pdftron.com/'
  enableRedaction: true
}, viewerElement)
  .then(instance => {
    // optionally you can switch to the redaction tool immediately
    const { Tools } = instance.Core;
    instance.UI.setToolMode(Tools.ToolNames.REDACTION);
  });

Besides passing in a constructor option, redaction can be toggled using the WebViewer API with the enableFeatures and disableFeatures functions.

WebViewer({
  ... // other options
}, viewerElement)
  .then(instance => {
    instance.UI.enableFeatures([instance.Feature.Redaction]);
  });

Get the answers you need: Support