Live data from Hacker News

Stirling-PDF: local web application to perform various operations on PDFs

github.com

191–200 of 240 posts

Re: Stirling-PDF: local web application to perform various operations on PDFs

#191

But... why? WHY?? Why would I run a docker container, a webserver, start a browser, navigate webpages... just to do some operations on a pdf locally? A few KiloBytes native program like PDFtk ( https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/ ) does the job perfectly. I don't understand what is the point of bloating softwares like this. Not even speaking of the very bad consequences for the planet.

Because PDF is a minefield and PDFtk does not solve all problems on all platforms. You'll learn that if you try to process millions of PDFs in the wild that may or may not comply with any of the numerous specs.

Re: Stirling-PDF: local web application to perform various operations on PDFs

#194
post #189

Earlier quoted context omitted.

The PDF spec even supports attachments in PDF files.

How does that work exactly? Is it widely supported? I recently had to add an embed feature to our pdf rendering, to allow users to embed other pdfs inside the one we generate for them. Since we use headless Chrome, I used pdfjs from mozilla to render the embedded pdf on screen before generating the pdf, so you can actually see and read the embedded pdf. Works pretty well, but was wondering about this attachment featu…

PDF is a container format and yoy can just shove files in there. pdftk supports this with attach_files, and at the very least the linux pdf readers I’ve used know how to deal with them.

Re: Stirling-PDF: local web application to perform various operations on PDFs

#195

But... why? WHY?? Why would I run a docker container, a webserver, start a browser, navigate webpages... just to do some operations on a pdf locally? A few KiloBytes native program like PDFtk ( https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/ ) does the job perfectly. I don't understand what is the point of bloating softwares like this. Not even speaking of the very bad consequences for the planet.

lol, you think sending TCP packets of your 25mb PDF to Google, so they can send it back, so you can send it to Google again in an email attachment, so they can send it to another Google server to another Google user, so that user can download it and upload it to Google, so they can print it on an 8.5" x 11" piece of paper is saving the planet? You just sent how much wattage around the globe 100 times for what? To pri…

How did you get "sending it to Google" from

> A few KiloBytes native program like PDFtk

Re: Stirling-PDF: local web application to perform various operations on PDFs

#196
post #91
post #84

Earlier quoted context omitted.

Yes, ChatGPT will do it if you upload photos of the page.

I just tried it with the API and it worked better than expected. Now I need to find to convert PDF to JPG with an API, and find the best prompt to ask GPT to only convert to markdown articles and not pages with columns, ads, etc. Thanks!

>Now I need to find to convert PDF to JPG with an API

You can do that very easily with a locally installed ImageMagick. ChatGPT can help with the commands needed, but should be just one to convert a PDF to a number of JPGs and a small shell script to run on all your files.

Re: Stirling-PDF: local web application to perform various operations on PDFs

#197

I'm looking for a tool other than adobe pdf reader that lets me upload an image file of my signature to sign a pdf. Most of the tools I found let me draw a signature and I can't draw my signature on a track pad or with the mouse

I made myself such a tool: https://pdf.rere.re

It's js only, nothing is sent to the server. It automatically makes the background of signatures transparent. The result is a raster pdf as if you printed, signed and scanned the document. I use it on desktop, not sure if it works well on phones.

Re: Stirling-PDF: local web application to perform various operations on PDFs

#198

Earlier quoted context omitted.

If you want the pdf to look anything like the email, you will need to render it in a browser and capture a pdf. It’s not particularly hard if you know what you’re doing.

Any libs to help with that? Thanks.

A headlees browser like e.g. puppeteer would do the job. I use it a lot for exatly that purpous...

Re: Stirling-PDF: local web application to perform various operations on PDFs

#199
post #141

Earlier quoted context omitted.

For annotating and adding a hand drawn signature to PDFs, preview really is the best: lightweight, straightforward, free, comes with the OS. I don’t know any comparable app for Linux (or windows although I rarely use it)

https://simplePDF.eu will be the closest « Preview-like » experience on Linux (and any OS really). It’s local only (the document you load and data you fill in never leave the browser) and free Disclosure: I’m the developer behind it

Any plans on implementing redaction?

Re: Stirling-PDF: local web application to perform various operations on PDFs

#200

Any recommendations for a desktop/cli PDF optimization tool that will reduce the size of a pdf? I've tried few and the best one so far is the one that is included in the subscription version of Adobe Acrobat. But I only need it occasionally and is not worth paying $20/month sub.

I recently found out Mac's built in Preview app can do this. Go to export then change the Quartz Filter to "Reduce File Size"
Post reply on HN