Odel
PDF Modifier

PDF Modifier

Local
@mlorentedev1PythonUpdated 2w ago

Modify PDF text, replace with regex, and analyze layout while preserving fonts.

PDF Modifier MCP

CLI + MCP server + Web UI for PDF text replacement with font style preservation.

CI PyPI Python 3.12+ Docs License: MIT

Quick start

pip install pdf-modifier-mcp

# CLI
pdf-mod modify input.pdf output.pdf -r "Draft=Final"

# MCP server (for Claude/Cursor/Codex)
claude mcp add -s user pdf-modifier -- uvx pdf-modifier-mcp

Interfaces

InterfaceDescriptionRun
CLIpdf-mod — batch jobs, scripting, CI pipelinesmake run cli ARGS="..."
MCP Serverpdf-modifier-mcp — AI agents edit PDFsmake run mcp
Web UIFastAPI + SvelteKit — drag & drop, preview, replacemake up (Docker) or make run api + make run frontend

Features

  • Text replacement — find and replace with font style preservation (family, weight, size, color)
  • Regex support — pattern-based bulk replacements (--regex)
  • Hyperlinks — create clickable links or neutralize existing ones
  • Batch processing — apply same replacements to multiple files
  • Web UI — drag & drop PDF upload, structure browser, page preview with zoom, text highlighting
  • MCP toolsread_pdf_structure, inspect_pdf_fonts, list_pdf_hyperlinks, modify_pdf_content

Development

# Setup
make setup

# Run tests
make test

# Full check (lint + type + test)
make check

# Start dev stack (Docker)
make up
# API: http://localhost:8000 | Web: http://localhost:8080

# Start servers locally
make run api          # FastAPI dev server
make run frontend     # SvelteKit dev server

Documentation

License

MIT