Jetformat

Redact PDF text with a regular expression

Use jetformat pdf redact to redact PDF text with a regular expression.

By Jetformat

Each --term is a regular expression, not necessarily a literal string. Escape metacharacters when matching literal text and keep the source private while reviewing the result.

Steps

  1. Start with a local PDF. Replace the sample paths and identifiers with your own.
  2. Run the command below. Save to a new output path so the source remains available for comparison.
  3. Check the result as described below before using it in another job.
jetformat pdf redact book.pdf --term secret -o redacted.pdf

Options for this task

Option Meaning
--output Output PDF path (required)
--term Regular expression to redact; may be repeated

Check the result

Extract text from the output, search for the target and variants, and visually review every affected page. Image text requires a separate process.

Notes and limits

This operation uses page-based credits. Review the billing guide before processing a large document.

The examples keep the original file. Add --force only when you intend to overwrite an existing output. Run jetformat pdf redact --help to compare options with your installed version.

See the pdf command reference for the surrounding workflow.

Last updated