Introduction to PDF redaction on Android
Redaction is the process of removing image, text, and vector content from a PDF page. This not only involves obscuring the content, but also removing the data in the document within the specified region.
Redaction is generally used when you want to remove personally identifiable or sensitive information from a document to ensure confidentiality and conform to regulations and privacy laws, such as GDPR or HIPAA. By using the Redaction component, the original content of a PDF can’t be restored, thereby guaranteeing privacy.
Redaction is a two-step process:
- First, redaction annotations are created in the areas that are to be redacted. This step won’t remove any content from the document yet; it just marks regions for redaction.
- Second, to actually remove the content, the redaction annotations need to be applied. In this step, the page content within the region of the redaction annotations is irreversibly removed.
The actual removal of content happens only after redaction annotations are applied to the document. Before applying them, they can be edited and removed the same as any other annotation.
Security of redaction
Redaction permanently removes the following information from a file:
- Visible text and the graphical content under the areas marked for redaction
- Annotations, comments, and markup intersecting the areas marked for redaction
The information isn’t simply obscured or masked, but is completely missing from the file.
Redaction doesn’t remove the following information:
- Metadata such as PDF title and author
- Embedded content and attached files (like XMP)
- Hidden layers
- Hidden text
Redacting graphic objects shared across pages
A PDF can draw the same object on several pages. That object can be an image, such as a logo. It can also be a form XObject, a reusable block of page content that can hold text, images, and vector graphics. A watermark and the field labels of a flattened form are common examples of shared text.
When a redaction removes content from a shared object, it removes that content from every page that draws the object. If the redaction removes text from a shared form XObject, the filled redaction area also appears on those pages.
For example, when you redact part of a logo shown on every page, the same part is redacted on all of them. Redacting shared images this way is compatible with how Adobe Acrobat does it.
PDF tools can store an identical image or form XObject once and reuse it on several pages to reduce file size. If some pages must keep content you redact on others, those pages can’t share the object. In that case, give each page its own copy of the shared objects, including nested ones, before you apply redactions. Redaction doesn’t split shared objects for you, so use a PDF processing tool to do this before you load the document.
Two objects can look the same and still be separate objects, so they aren’t always redacted together. Review every page of the redacted document, including pages you didn’t mark.
Licensing
The Redaction component requires a separate license. Without it, Nutrient applies these restrictions:
- Hides the redaction toolbar button and text selection menu item.
- Hides the floating redaction information button.
- Hides existing redaction annotations and excludes them from
AnnotationProviderresults. Users can’t select them or open them in the inspector. - Prevents creation of
RedactionAnnotationinstances. - Disables
PdfFragment#isRedactionAnnotationPreviewEnabled,applyRedactions, and related APIs, or throws an exception when you call them.