Live data from Hacker News

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

github.com

161–170 of 240 posts

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

#161

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.

[flagged]

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

#162

Earlier quoted context omitted.

I find Chrome's built-in PDF viewer much snappier than Adobe Acrobat.

Sadly I had to install Adobe Reader on my father PC again after he had documents* with formulas. Chrome would calculate the numbers wrong. Everything was off by 10. *To get reimburses from a union or something.

I recently had issues with macOS‘ Preview.app and formulas. It’s a nice feature, but probably not widely supported.

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

#163
post #160

Earlier quoted context omitted.

Yes, its mainly to reduce image size for scanned documents. I'll give Ghostscript a try.

Something like this is probably a good starting point: ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf From this gist https://gist.github.com/guifromrio/6390547#

Very helpful tip. Thank you! - Ran it through GS and I got 30% reduction in a 50mb pdf file. I think if I play around with some options - such as converting images to grayscale, I might be able to reduce it by another 10-20%.

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

#164
post #145

Earlier quoted context omitted.

We often get PDF's that does not work in our pipeline and it's always blamed on the pipeline, not on the creating software. The user usually converts the PDF to an image with adobe reader and screenshot, load up Libreoffice, paste and export it as PDF archive.

So the PDF that does not work in your pipeline is created by LibreOffice rather than Adobe Acrobat? That doesn't seem to add any strength to the argument that "Adobe Acrobat has unusual powers because only it can handle the full spec of PDF".

No, you missread. The PDF that works is created by anything that does not use the full spec of new PDF versions. We have chosen Libreoffice because we already use it for other things. If we recreate the PDF in Libreoffice as PDF archive version it works just fine. The problem is usually a pamphlet created by some ad agency using the absolutely latest version of some layout program, neither adobe nor libreoffice. The PDF usually works just fine in Adobe but not in our pipeline that uses all sorts of linux programs to process into a JPG in the format and orientation our system needs. Noone has had the time or energy to fix it since most stuff works so for now it will be downsampled by a screenshot and just showed into the system. The added benefit is the PDF shrinks from 150 MB to 300 kB in the process.

Adobe Acrobat is the only thing that can handle all cases yes. All other programs uses (different) special cases each and most of them fail in some edge cases. It can be funny letters showing up because of fonts not working properly or images disapearing or all sorts of things. I have given up to fix them all. I still have a library of PDF's that we used to run through to try to get as many as possible to work.

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

#166

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.

A web app makes it cross platform. If you have a homelab, deploy it only once for every client. And PDFtk doesn’t do annotations afaik which is a huge pain point on Linux (at least for me) because there are no applications that I know of to easily do things that are trivial on OSX like adding text or hand drawn signatures to PDFs. Masterpdf can do it but with a watermark and some limitations. Maybe it doesn’t suit yo…

> no applications that I know of to easily do things that are trivial on OSX like adding text or hand drawn signatures to PDFs

Try xournal++

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

#167

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.

If you're on a Mac, (my) PdfCompress is fairly smart about doing a good job.

Haven't updated it in while though... :-/

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

#168

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.

A web app makes it cross platform. If you have a homelab, deploy it only once for every client. And PDFtk doesn’t do annotations afaik which is a huge pain point on Linux (at least for me) because there are no applications that I know of to easily do things that are trivial on OSX like adding text or hand drawn signatures to PDFs. Masterpdf can do it but with a watermark and some limitations. Maybe it doesn’t suit yo…

Xournal++ was already mentionned, Okular also has annotations and I think adding hand drawn signatures.

Though I welcome (new) work in this area.

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

#169
post #80

Earlier quoted context omitted.

Adobe acrobat (and maybe reader) is really the only app that fully supports the full PDF spec as understood by the authors of the spec. There are ridiculous parts of the spec that allow support for things like JS, etc.

I've seen many third party PDF viewers; I think all supported JavaScript. It's commonplace, not 'ridiculous' at all. > Adobe acrobat (and maybe reader) is really the only app that fully supports the full PDF spec The full spec is large and afaik has many obscure pieces, including 3-D, etc. Like many specs, they don't match reality and nobody takes completeness too seriously. For almost all users, supporting the entir…

Yeah, even Adobe doesn't really use the full spec. Or at least didn't.

There's a fairly big chunk in the spec of special presentation attributes for slideshows. When I implemented them I was surprised that slide shows produced by Acrobat didn't work. Well, obviously my implementation was buggy.

Er, no, Adobe didn't use their own slide show attributes for the slide shows produced by Acrobat. They used JavaScript instead.

Oh well. ¯\_(ツ)_/¯

Post reply on HN