Some test text!

Search
Downloads
Chat with us
Discord Logo
Hamburger Icon

Android / Guides / Redact

Get started

Samples

Frameworks

Open/Save Document

Learn more

Viewer

UI Customization

Annotation

Collaboration

MS Office

Generate via template

Conversion

PDF/A

Forms

Generate

Page manipulation

Editing page content

Extraction

Digital signature

Search

Bookmarks

Compare files

Optimization

Layers (OCGs)

Measurement

Print

Redaction

Overview Redact Samples APIs

Security

Portfolios

Low-level PDF API

Redact

There are two options to perform redaction. First is using a UI component that provides tools to select text or create regions interactively. Second is an API guide to programmatically apply redactions.

API to programmatically redact PDFs in Android

To redact content from a PDF document.

Java

Kotlin

Redactor.Redaction[] rarr = new Redactor.Redaction[7]; rarr[0] = new Redactor.Redaction(1, new Rect(100, 100, 550, 600), false, "Top Secret"); rarr[1] = new Redactor.Redaction(2, new Rect(30, 30, 450, 450), true, "Negative Redaction"); rarr[2] = new Redactor.Redaction(2, new Rect(0, 0, 100, 100), false, "Positive"); rarr[3] = new Redactor.Redaction(2, new Rect(100, 100, 200, 200), false, "Positive"); rarr[4] = new Redactor.Redaction(2, new Rect(300, 300, 400, 400), false, ""); rarr[5] = new Redactor.Redaction(2, new Rect(500, 500, 600, 600), false, ""); rarr[6] = new Redactor.Redaction(3, new Rect(0, 0, 700, 20), false, ""); Redactor.Appearance app = new Redactor.Appearance(); app.redactionOverlay = true; app.border = false; app.showRedactedContentRegions = true; PDFDoc doc = new PDFDoc(filename); Redactor.redact(doc, rarr, app, false, true);
Copy

PDF redaction
Full code sample which shows how to use pdftron.PDF.Redactor to remove potentially sensitive content within PDF documents.

About redactor

Apryse Redactor makes sure that if a portion of an image, text, or vector graphics is contained in a redaction region, that portion of the image or path data is destroyed and is not hidden with clipping or image masks. Apryse SDK API can also be used to review and remove metadata and other content that can exist in a PDF document, including XML Forms Architecture (XFA) content and Extensible Metadata Platform (XMP) content.

The redaction process in Apryse SDK consists of two steps:

1. Content identification
A user applies redact annotations that specify the pieces or regions of content that should be removed. The content for redaction can be identified either interactively (e.g. using ‘pdftron.PDF.PDFViewCtrl’ as shown in PDFView sample) or programmatically (e.g. using ‘pdftron.PDF.TextSearch’ or ‘pdftron.PDF.TextExtractor’). Up until the next step is performed, the user can see, move and redefine these annotations.

2. Content removal
Using ‘pdftron.PDF.Redactor.Redact()’ the user instructs Apryse SDK to apply the redact regions, after which the content in the area specified by the redact annotations is removed. The redaction function includes number of options to control the style of the redaction overlay (including color, text, font, border, transparency, etc.).

Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales