A CLI tool to edit PDF slides using Nano Banana (Gemini 3 Pro Image)
Project description
Nano PDF Editor
A CLI tool to edit PDF slides using natural language prompts, powered by Google's Gemini 3 Pro Image ("Nano Banana") model.
Features
- Natural Language Editing: "Make the header blue", "Fix the typo", "Change the chart to a bar graph".
- Context-Aware: Understands the visual style of your deck (fonts, colors, layout) by analyzing reference slides.
- Non-Destructive: Preserves the searchable text layer of your PDF using OCR re-hydration.
- Multi-page & Parallel: Edit multiple pages in a single command with concurrent processing.
Installation
pip install nano-pdf
Configuration
You need a Google Gemini API key. Set it as an environment variable:
export GEMINI_API_KEY="your_api_key_here"
Usage
Basic Edit
Edit a single page (e.g., Page 2):
nano-pdf edit my_deck.pdf 2 "Change the title to 'Q3 Results'"
Multi-page Edit
Edit multiple pages in one go:
nano-pdf edit my_deck.pdf 1 "Update date to Oct 2025" 5 "Add company logo" 10 "Fix typo in footer"
Options
--use-context: Include the full text of the PDF as context for the model. (Disabled by default to prevent hallucinations).--style-refs "1,5": Manually specify which pages to use as style references.--output "new.pdf": Specify the output filename.
Requirements
- Python 3.10+
poppler(for PDF rendering)tesseract(for OCR)
System Dependencies (macOS)
brew install poppler tesseract
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nano_pdf-0.1.0.tar.gz.
File metadata
- Download URL: nano_pdf-0.1.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bba13114472731f24705e3a704073f39ff45f7870bf40fd2909a992f191ecd1c
|
|
| MD5 |
0594d66f910507a76e13a02ecfe18fbf
|
|
| BLAKE2b-256 |
d00971eff1d20808381509d57716b7c28b7c65dce5e99c53e79d2a0b2c47b9d7
|
File details
Details for the file nano_pdf-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nano_pdf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
360c20fdb281c0b671647b6826020ff0fc2365f7afc682ee9e5ba8125a9d1c5c
|
|
| MD5 |
25aa1437673ad7adf2e42bd7fcff3577
|
|
| BLAKE2b-256 |
2bd807370aba1fcca49f75356535093158810eeed13ca5551722f249417d037c
|