←back to thread

176 points GavCo | 1 comments | | HN request time: 0s | source

The new Gemini 3 Pro Image model (aka Nano Banana) is incredible at generating slides, so I thought it would be fun to build a CLI tool that lets you edit PDF presentations using plain English. The tool converts the page you want to edit into an image, sends it to the model API together with your prompt to generate an edited image, then converts the updated image back and stitches into the original document.

Examples:

- `nano-pdf edit deck.pdf 5 "Update the revenue chart to show Q3 at $2.5M"`

- `nano-pdf add deck.pdf 15 "Create an executive summary slide with 5 bullet points"`

Features:

- Edit multiple pages in parallel

- Add entirely new slides that match your deck's style

- Google Search enabled by default so the model can look up current data

- Preserves text layer for copy/paste and search

It can work with any kind of PDF but I expect it would be most useful for a quick edit to a deck or something similar.

GitHub: https://github.com/gavrielc/Nano-PDF

Show context
ThrowawayTestr ◴[] No.46091166[source]
I recently tried to change a single word in a PDF and nearly tore my hair out (thank you LibreOffice) I'll definitely keep this in mind for next time, thank you.
replies(1): >>46091321 #
tkfoss ◴[] No.46091321[source]
Try photopea next time
replies(1): >>46093717 #
albert_e ◴[] No.46093717[source]
Wow - didnt know about this tool for PDF editing - thanks!

https://www.photopea.com/

PS: in my quick test of editing a PDF text -- the output PDF had weirdly added an extra "&" symbol at the end of every existing line of text. will try out more to see if it was something in the input PDF that was causing it.

replies(1): >>46097573 #
fzysingularity ◴[] No.46097573[source]
What is photopea built on?
replies(1): >>46114162 #
1. tkfoss ◴[] No.46114162[source]
Author does yearly AMAs on reddit, you should look it up.