How to Redact Legal Discovery Documents Securely
Step-by-step guide to redacting privileged information from legal discovery PDFs offline, ensuring true removal of text, metadata, and hidden layers.
Legal discovery redaction carries stakes that most document sanitization does not. A failed redaction in litigation can waive privilege, expose confidential client information to opposing counsel, or violate protective orders. Courts have sanctioned attorneys for redaction failures that revealed Social Security numbers, trade secrets, and attorney-client communications—sometimes because the "redacted" text was trivially recoverable with a copy-paste operation.
This guide covers secure, offline workflows for redacting discovery documents before production, with specific attention to the failure modes that have caused real-world sanctions.
Why discovery redaction fails
Most redaction failures in litigation fall into three categories:
Visual-only redaction. Drawing a black rectangle over text in a PDF editor leaves the underlying text intact. Opposing counsel (or anyone) can select the "redacted" area, copy it, and paste the original text into another application. This is not theoretical—it has happened in high-profile cases involving the DOJ, major law firms, and government agencies.
Metadata and embedded objects. Discovery documents often contain tracked changes, comments, embedded files, previous versions, and author information. A PDF converted from Word may retain the original document's revision history. Producing such a file can inadvertently disclose privileged attorney notes or draft language.
Layer and annotation persistence. Some PDF editors store redactions as removable annotations rather than permanent modifications. The recipient can delete the annotation layer and view the original content.
Secure redaction requires destroying the original text at the file level, not merely obscuring it visually.
Pre-redaction: document inventory and privilege log
Before touching any redaction tool, establish your workflow:
-
Work from copies. Never redact originals. Maintain an unredacted archive with restricted access for potential in camera review.
-
Map redaction targets. Identify privileged content, PII, trade secrets, or information subject to protective orders. Your privilege log should correspond to specific redaction locations.
-
Document your process. Courts may require you to explain your redaction methodology. Record the tools used, the date of processing, and the verification steps performed.
Secure redaction workflow (offline)
Option 1: Adobe Acrobat Pro (local, no cloud)
Acrobat Pro's redaction tool, when used correctly, performs true content removal. The critical step is applying the redactions, not just marking them.
- Open the PDF in Acrobat Pro. Disable any cloud sync features.
- Navigate to Tools → Redact.
- Select Mark for Redaction, then highlight the target text or areas.
- After marking all targets, click Apply Redactions. Acrobat will warn that this action is permanent—confirm.
- Run Tools → Redact → Remove Hidden Information to strip metadata, comments, embedded files, and hidden layers.
- Save as a new file. Do not overwrite the original.
Acrobat's "Sanitize Document" feature combines redaction application with metadata removal. Use it as a final pass.
Option 2: Command-line pipeline (qpdf + Ghostscript + exiftool)
For batch processing or environments where Acrobat is unavailable, a command-line pipeline provides verifiable, scriptable redaction.
Step 1: Flatten and rasterize with Ghostscript
Converting each page to a flat image destroys selectable text, layers, and embedded objects:
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress \
-dCompatibilityLevel=1.4 -sOutputFile=flattened.pdf input.pdf
For maximum security, rasterize to images and reassemble:
gs -dNOPAUSE -dBATCH -sDEVICE=png16m -r300 -sOutputFile=page_%03d.png input.pdf
Then redact the images (using ImageMagick or a local image editor) and reassemble:
convert page_*.png reassembled.pdf
Step 2: Strip metadata with exiftool
exiftool -all= -overwrite_original reassembled.pdf
Step 3: Linearize and clean with qpdf
qpdf --linearize --object-streams=disable reassembled.pdf final_production.pdf
This pipeline produces a PDF with no selectable text, no metadata, and no hidden layers. The tradeoff is that the output is not text-searchable—acceptable for many discovery productions, but verify with opposing counsel or the court if searchability is required.
Option 3: mat2 for metadata-focused sanitization
The mat2 tool (Metadata Anonymisation Toolkit 2) strips metadata from PDFs and other file types:
mat2 --inplace document.pdf
mat2 does not perform visual redaction—it removes embedded metadata, author information, and certain hidden objects. Use it as a complement to visual redaction, not a replacement.
Handling specific document types
Scanned documents (image-based PDFs)
Scanned discovery documents are already rasterized, so text selection is not a concern. However, OCR layers added later can reintroduce selectable text. Verify by attempting to select text in the PDF viewer. If text is selectable, treat the document as a standard PDF and flatten it.
Native files converted to PDF
Word documents, Excel spreadsheets, and PowerPoint files converted to PDF may retain tracked changes, comments, and document properties. Before conversion:
- In Word: File → Info → Check for Issues → Inspect Document. Remove all found items.
- Convert to PDF using "Print to PDF" rather than "Save as PDF"—this produces a flatter output.
- Run metadata removal on the resulting PDF.
Email productions
Email PDFs often contain header metadata (routing information, internal server names) and embedded attachments. Extract and process attachments separately. Consider whether header information requires redaction under your protective order.
Verify your work
Verification is non-negotiable. Every redacted document should pass these checks before production:
Text extraction test:
pdftotext final_production.pdf - | grep -i "privileged_term"
Replace "privileged_term" with keywords from your redacted content. Any matches indicate failed redaction.
Metadata inspection:
exiftool final_production.pdf
pdfinfo final_production.pdf
Review output for author names, creation software, timestamps, or other identifying information.
Visual inspection:
Open the PDF in multiple viewers (Preview, Adobe Reader, a web browser). Attempt to select text in redacted areas. If any text highlights, the redaction failed.
Object stream inspection:
qpdf --show-object=all final_production.pdf | less
Search for plaintext fragments of redacted content in the object streams.
For guidance on thorough metadata inspection, see How to Check a PDF for Hidden Metadata.
Common mistakes to avoid
- Using "highlight" instead of "redact." Highlight annotations are trivially removable.
- Forgetting to apply redactions. Marked redactions are not applied until you explicitly confirm.
- Skipping metadata removal. Redacting visible text while leaving author metadata intact can still identify privileged reviewers.
- Trusting online redaction tools. Uploading privileged discovery documents to any third-party service creates chain-of-custody issues and potential waiver concerns. See Is It Safe to Redact PDFs Online? A Risk Assessment.
- Producing the working copy. Always produce a freshly exported file, not the file you edited.
Batch processing for large productions
For productions involving hundreds or thousands of documents, script your pipeline:
#!/bin/bash
for pdf in ./input/*.pdf; do
filename=$(basename "$pdf")
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="./processed/$filename" "$pdf"
exiftool -all= -overwrite_original "./processed/$filename"
qpdf --linearize "./processed/$filename" "./final/$filename"
done
Log each file processed with timestamps. Retain logs as part of your production record.
Key takeaways
- Black rectangles over text are not redaction—the text remains in the file until you flatten or rasterize the document.
- Always apply redactions (not just mark them) and remove hidden information as separate steps.
- Metadata removal is mandatory. Author names, revision history, and embedded objects can disclose privileged information.
- Verify every document with text extraction, metadata inspection, and visual review before production.
- Work offline. Discovery documents should never touch third-party servers.
- Document your methodology. Courts may require you to explain how redactions were performed.
For related workflows, see How to Flatten a PDF to Remove Hidden Layers Securely and Remove Hidden Data From a PDF Before Sending It.