AVAILABLE NOW: Spring 2026 Release

Home

All Blogs

PDF Redaction SDK: A Developer's Guide to Permanent, Production-Ready Redaction

Published May 27, 2026

Updated May 27, 2026

email
linkedIn
twitter
link

PDF Redaction SDK: A Developer's Guide to Permanent, Production-Ready Redaction

Sanity Image

Isaac Maw

Technical Content Creator

Sanity Image

PDF Redaction requires more than placing black boxes over text, or even deleting text. PDF documents are layered, and they come with complex metadata, including version history. To securely redact content such as Personal Identifiable Information (PII) for compliance with regulations like GDPR and HIPAA, a redaction SDK must permanently remove data from the document.

What is Secure Redaction?

Copied to clipboard

Before digital documents, redaction was historically done with black ink or a craft knife, permanently removing or obscuring words. In the age of PDF documents, users sometimes think that these same ideas can work – adding black boxes over text, editing the document to delete sensitive info, or changing the text color to white are sometimes incorrectly used when redaction is needed. In fact, there have been high-profile legal cases in which sensitive data was exposed due to improper digital redaction.

Secure PDF Redaction is a form of editing where information is permanently removed from a document. This is typically used to remove classified information so confidential documents can be distributed.

Redaction consists of two steps:

  1. Marking content (text, images, or pages) for redaction using redact annotations. This creates a rectangle around the content to be removed and hovering over the redaction will show what it will look like when it's applied. Because redaction is irreversible, this step is critical to confirm content before removal.
  2. Applying redactions to remove information. Typically, a black rectangle is used to cover up the redacted area, but this can be configured to another color or to show overlay text. In the case of Apryse redaction, this box is added in addition to the removal of the content. Moving or erasing the box can’t reveal content. This redaction step is irreversible and the content is permanently removed.

To see the Apryse Redaction SDK in action, check out the demo.

Why Apryse for Redaction

Copied to clipboard

In addition to providing secure redaction via the UI as well as programmatically, Aprys enables developers to embed secure redaction into applications with additional valuable features such as AI PII detection, self-hosted or on-prem deployment, and an accessibility-compliant interface. In addition, because Apryse SDKs support end-to-end document workflows, it’s easy for developers choosing Apryse for redaction to quickly build other document processing requirements without encountering dependency or compatibility issues.

Gettting Started

Copied to clipboard

To use Apryse Redaction, you’ll need to get a trial key for Apryse WebViewer SDK. Follow the Quick Start guide to integrate WebViewer with your platform and framework.

Next, 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.

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]);
  });

Creating redactions with the UI

Copied to clipboard

To create a new redaction in WebViewer, click on the redaction tool icon to enter redaction mode. Next click and drag on the document to create a new redaction. Note that when creating a redaction on top of text, multiple rectangles are created, similar to when highlighting text. To apply redactions, users can click the apply button or “Apply All”.

Creating redactions programmatically

Copied to clipboard

Redactions can be added to a document similarly to other annotations, by adding them to the AnnotationManager and redrawing. Redaction annotations have two differences compared to other annotation types.

  • setRect() should be used instead of setting X,Y,Height, or Width directly
  • The redaction annotation constructor can take an options object that can be used to configure the annotation. There are a number of properties that can be set using the constructor:
  • StrokeColor: This is the border color of the redaction before it been applied. Defaults to red.
  • FillColor: This is the fill color of the redaction after it been applied. Defaults to black.
  • PageNumber: The page that the redaction should appear on.
  • Rect: A Math.Rect object of the redaction area.
  • Quads: An array of Math.Quad objects of to specify multiple redaction areas. If Quads are provided then Rect is not needed.

Redactions are applied programmatically using the applyRedactions function on AnnotationManager. applyRedactions returns a promise and can be used to apply a single redaction, an array of redactions, or all redactions in a document.

Next Steps

Copied to clipboard

With the right tool for marking and removing sensitive content, developers can support better compliance and industry-specific workflows inside their software projects, without forcing users to leave the platform to use standalone web or desktop applications for redaction.

To learn more about WebViewer capabilities, check out our product page. Check out the redaction documentation and start your free trial to get started. With any questions, contact sales.

Q: Why is Apryse better for secure PDF redaction than basic PDF editors?

A: Apryse permanently removes sensitive content instead of just covering it with black boxes. It also sanitizes document layers and metadata to support GDPR and HIPAA compliance workflows.

Q: Does Apryse support AI-powered PII detection and secure deployment models?

A: Yes. Apryse supports AI-assisted PII detection and can be deployed fully self-hosted or on-prem, making it suitable for regulated industries and private environments.

Q: Can developers integrate Apryse redaction directly into existing applications?

A: Yes. Apryse WebViewer SDK provides browser-based redaction tools and APIs that developers can embed directly into web applications without requiring separate desktop software.

Ready to get started?

Sign up for a free trial to begin implementing the Apryse SDK in your application!