Live data from Hacker News

Show HN: Nano PDF – A CLI Tool to Edit PDFs with Gemini's Nano Banana

github.com

31–40 of 43 posts

Re: Show HN: Nano PDF – A CLI Tool to Edit PDFs with Gemini's Nano Banana

#31
Behold, the might of LLMs! Instead of ushering the age of AGI as advertised 6 months ago, now it cleans your PDFs for you.

Many thanks to humanity for failing to standardise PDF and this project for paying interest on that tech debt with datacenter levels of energy consumption.

Re: Show HN: Nano PDF – A CLI Tool to Edit PDFs with Gemini's Nano Banana

#32
post #13

> Converts an image to a single-page PDF with a hidden text layer using Tesseract. This is the 'State Preservation' step. Does this mean the text only pdf page is transformed into an image that covers the full page, but the text is still under there. So, any machine based extraction would still get the text, but would probably loose all the bounding box information and regular users cannot just use their mouse to sel…

Seems true and really wish the project included some sample PDF output. My Text to Speech app uses bounding box to display what text in PDF is being read and would not work well PDF's from this project.

OP here, I added a sample PDF output in the project assets and put screenshots in the ReadMe. The text is selectable after rehydration. would this work with your app?

Re: Show HN: Nano PDF – A CLI Tool to Edit PDFs with Gemini's Nano Banana

#33
post #32
post #13

Earlier quoted context omitted.

Seems true and really wish the project included some sample PDF output. My Text to Speech app uses bounding box to display what text in PDF is being read and would not work well PDF's from this project.

OP here, I added a sample PDF output in the project assets and put screenshots in the ReadMe. The text is selectable after rehydration. would this work with your app?

Wait! what? This is incredible. Amazing work.

Re: Show HN: Nano PDF – A CLI Tool to Edit PDFs with Gemini's Nano Banana

#34
I am disappointed that this doesn't modify the underlying pdf structure (which is a horror show, I know) but instead relies on fairly lossy OCR back&fourths.

I wish an agent with a validation and rendering tools could instead manipulate the structure to accomplish those edits way less destructively, checking its progress with the tools.

Re: Show HN: Nano PDF – A CLI Tool to Edit PDFs with Gemini's Nano Banana

#35
post #10

Earlier quoted context omitted.

Try photopea next time

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.

What is photopea built on?

Re: Show HN: Nano PDF – A CLI Tool to Edit PDFs with Gemini's Nano Banana

#36
post #32
post #13

Earlier quoted context omitted.

Seems true and really wish the project included some sample PDF output. My Text to Speech app uses bounding box to display what text in PDF is being read and would not work well PDF's from this project.

OP here, I added a sample PDF output in the project assets and put screenshots in the ReadMe. The text is selectable after rehydration. would this work with your app?

Amazing. Worked really well. Thank you.

Re: Show HN: Nano PDF – A CLI Tool to Edit PDFs with Gemini's Nano Banana

#37
post #15

Earlier quoted context omitted.

Generally agreed! though fun point of info: you can use the .avif format to get something that behaves just like a gif (auto-playing, no sound, no controls) but supports modern features (HDR/transparency channel) and is compressed as well as a modern video is, since its just AV1. And it's supported in most all modern browsers these days: https://caniuse.com/?search=avif

I tend to use webm but I’m curious, is avif better (performance, size) for gif?

Webm is better in many ways, but it doesn't give you gif-like behavior I think. As in, you can't just include it in an tag and a get an autoplaying looping video. Though you can simulate it with .

Basically, .avif is an "animated image" format, like .gif, but .webm is only a video format.

edit: just realized .webp i think can be an animated image! So that seems like the alternative

Re: Show HN: Nano PDF – A CLI Tool to Edit PDFs with Gemini's Nano Banana

#38
post #37

Earlier quoted context omitted.

I tend to use webm but I’m curious, is avif better (performance, size) for gif?

Webm is better in many ways, but it doesn't give you gif-like behavior I think. As in, you can't just include it in an tag and a get an autoplaying looping video. Though you can simulate it with . Basically, .avif is an "animated image" format, like .gif, but .webm is only a video format. edit: just realized .webp i think can be an animated image! So that seems like the alternative

Thanks

Re: Show HN: Nano PDF – A CLI Tool to Edit PDFs with Gemini's Nano Banana

#39
post #2

This is nuts and I absolutely love this. So you convert the PDF into image, edit the image, then convert the image back into a PDF.

This is the usual workflow dealing with pdfs (unfortunately)

No, it's not, unless you are dealing with scans. Lots of apps let you edit PDFs.

Re: Show HN: Nano PDF – A CLI Tool to Edit PDFs with Gemini's Nano Banana

#40

Earlier quoted context omitted.

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.

What is photopea built on?

Author does yearly AMAs on reddit, you should look it up.
Post reply on HN