For the complete documentation index, see llms.txt. This page is also available as Markdown.

Setting up redaction in WebViewer

Requirements

These packages are required to use these features in production. Trial keys have unlimited access to all features

Package: RedactionLive demo

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.apryse.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);
  });
WebViewer({
  ... // other options
  fullAPI: true,
  // can also use 'pdftronServer' instead of 'fullAPI'
  // pdftronServer: 'https://demo.apryse.com/'
  enableRedaction: true
}, viewerElement)
  .then(instance => {
    // optionally you can switch to the redaction tool immediately
    const { Tools } = instance;
    instance.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.UI.Feature.Redaction]);
  });
WebViewer({
  ... // other options
}, viewerElement)
  .then(instance => {
    instance.enableFeatures([instance.Feature.Redaction]);
  });

Last updated

Was this helpful?