# Nano PDF Nano PDF is a CLI tool that edits PDF slides using natural language prompts, powered by Google's Gemini 3 Pro Image model. It can modify existing slides or generate new ones that match the visual style of the deck. ## Key Features - **Natural language editing**: change titles, update graphs, fix typos across multiple slides - **Add new slides**: generate slides matching the existing deck's visual style - **Non-destructive**: preserves searchable text layer via OCR re-hydration (Tesseract) - **Multi-page and parallel**: edit multiple pages in a single command with concurrent processing - **Configurable resolution**: 4K (default), 2K, 1K to balance quality vs cost - **Google Search integration**: model can search the web for information before generating - **Style references**: specify pages to use as style reference for consistent visual output ## How It Works 1. **Page rendering**: converts target PDF pages to images using Poppler 2. **Style references**: optionally includes reference pages for fonts, colors, layout 3. **AI generation**: sends images + prompts to Gemini 3 Pro Image 4. **OCR re-hydration**: Tesseract restores searchable text layer 5. **PDF stitching**: replaces original pages with AI-edited versions ## Usage ```bash pip install nano-pdf nano-pdf edit <file> <page> "<prompt>" nano-pdf add <file> <position> "<prompt>" ``` Requires Poppler, Tesseract, and a paid Google Gemini API key (free tier does not work). ## Technical Details - Written in Python (3.10+) - MIT license - 1.2k GitHub stars ## References - https://github.com/gavrielc/Nano-PDF ## Related -