This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/android/redaction/built-in-ui.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Android PDF viewer with redaction | Nutrient SDK

Use Nutrient’s built-in UI to create, customize, preview, and apply redactions.

Adding redactions

To mark text for redaction, follow these steps:

  1. Select the redaction tool on the annotation toolbar.
  2. Drag across the text.
  3. Lift your finger to create the redaction annotation.
Annotation toolbar tool

Alternatively, select text first. Then tap the redaction item in the selection menu.

Text selection menu

Use the annotation inspector to customize a redaction annotation’s properties and appearance.

Redacted inspector

Applying redactions

PdfActivity and PdfUiFragment display a floating Redaction button when the document contains redaction annotations. To apply redactions, follow these steps:

  1. Tap Redaction.
  2. Tap Apply Redactions.
  3. Choose whether to overwrite the document or save a new copy.

Applying redactions permanently removes the marked content and the redaction annotations.

To remove the annotations without redacting content, tap Clear Redactions. The regular undo button can reverse this clearing operation.

When opening a document, Nutrient checks for existing redaction annotations before displaying the button. This check can delay its appearance.

Previewing redactions

Preview mode displays redaction annotations as they’ll appear after redaction, instead of their default marked appearance. To enable preview mode, follow these steps:

  1. Tap the floating Redaction button.
  2. Tap Enable Redaction Preview.

Previewing doesn’t remove content. Only applying redactions removes content from the document.

Custom redaction UI

To replace the built-in UI, disable the floating button with PdfActivityConfiguration.Builder#setRedactionUiEnabled(), and provide your own UI to indicate pending redactions, preview them, and apply them.