Live data from Hacker News

Spotlight on pdfly, the Swiss Army knife for PDF files

chezsoi.org

91–100 of 100 posts

Re: Spotlight on pdfly, the Swiss Army knife for PDF files

#91

Not the same thing but just want to shoutout https://www.pdfgear.com/ as one of the only viable alternatives to adobe for intermediate level PDF tinkering. It’s free and available for everything except Linux.

There's also Master PDF, and it's also available for Linux: https://code-industry.net/masterpdfeditor/

Re: Spotlight on pdfly, the Swiss Army knife for PDF files

#92

Earlier quoted context omitted.

Swiss Army knives seem to be as popular as ever. What do you mean, doesn't have a positive connotation? They're great hiking, camping, traveling, in backpacks and bags. What's wrong with it as a knife? It's perfectly sharp. Obviously it's not a full-sized chef's knife , but it will cut your apple or twine or packing tape. It's a multitool. It does lots of things. A tool of "last resort" seems to miss the point -- it'…

>Swiss Army knives seem to be as popular as ever. It isn't as popular as ever, at least not in the Western world. I don't know what your frame of reference is, but it is positively non-existent compared to a couple of decades ago. Approximately zero kids, give or take a few, put one on their Christmas list, where when I was a kid it was many kid's dream item. I would say the most common buyer today are middle-aged me…

For me it's a bottle opener, a corkscrew and a knife that's good enough.

More picnic less camping in the wild.

Re: Spotlight on pdfly, the Swiss Army knife for PDF files

#93
post #2

curiously poppler doesn't mention that anywhere on their website, but the library comes with a similar suite of tools, typically available in linux distributions. i have found them very helpful. https://en.wikipedia.org/wiki/Poppler_(software)#poppler-uti...

I just used these tools to parse a few hundred thousand PDF paystubs to get data into our new financial system. 10/10 would use again.

Re: Spotlight on pdfly, the Swiss Army knife for PDF files

#94
post #50

Opinion from 10 years ago, I suspect still valid: There are a million python libraries and tools to do some overlapping subset of the things you'd want to do with a pdf. There are no doubt another million in other languages. These are each basically bundles of some of the transformations you'd want to make to the same underlying data structure. So, complex pdf scripts often need two or three different libraries to ge…

ffmpeg but for PDFs

Re: Spotlight on pdfly, the Swiss Army knife for PDF files

#95
post #26

Earlier quoted context omitted.

Came here to say this. Qpdf is my go-to for manipulating pdf files on the command line. Encrypting, decrypting, extracting and merging pages. It's Apache-licensed and written in C++.

How do you use qpdf for extraction when its README states “qpdf does not render PDFs or perform text extraction, and it does not contain higher-level interfaces for working with page contents.”

You can render the PDF into QDF mode and then it is relatively easy to extract text just by searching for Tj and TJ operators.

Re: Spotlight on pdfly, the Swiss Army knife for PDF files

#96
post #82

Earlier quoted context omitted.

"Adobe couldn't decide if PDF was for print control or documents" Apparently people don't understand the history of PDF. PDF was originally a way to encapsulate PostScript so you could display it on a screen. Unlike PCL, Postscript (and PDF) were device-independent, with a WYSIWYG guarantee. Postscript and PDF are literally the history of WYSIWYG on personal computers and computer-based printing/typesetting. PDF is n…

One of my first jobs was at an isp/web/cohost company. We had a big bank of modems for dialup customers, had some customers who terminated isdn with us, a rack of colocation and built websites as well. The company was partially owned and housed primarily in a print shop, we worked above the press floor and I was sometimes pressed into service helping when we were slow (I had some experience working in a print shop in…

I had an early job with an ISP that was similar, had modems in people's garages all over the county since this was when calling local could get expensive. The ISP was in the back of a computer store though. Once an ISP customer came into the store. I was just answering phones in the back room, but they sent me to the floor to talk to the customer. I was wearing sandals, and the sales manager fired me on the spot for being on his floor with sandals. The person who I really reported to tried to hire me back when he found out that sales manager had sent me home and fired me.

Re: Spotlight on pdfly, the Swiss Army knife for PDF files

#97
post #61
post #50

Opinion from 10 years ago, I suspect still valid: There are a million python libraries and tools to do some overlapping subset of the things you'd want to do with a pdf. There are no doubt another million in other languages. These are each basically bundles of some of the transformations you'd want to make to the same underlying data structure. So, complex pdf scripts often need two or three different libraries to ge…

When you write a PDF library, there are design trade-offs all the way down, depending on use cases. (Just “in-memory” is already an important design trade-off, because the PDF format is intentionally designed to not require the whole PDF to be loaded into memory at once.) It would also be antithetical to preferring deep modules with minimal interfaces over shallow modules with broad interfaces [0]. Lastly, in managed…

Ah that reminds me of the days when I was viewing a large PDF (some instruction manual that's hundreds of pages long) and the pages appear in the browser as soon as they are downloaded.

Re: Spotlight on pdfly, the Swiss Army knife for PDF files

#98
post #97
post #61

Earlier quoted context omitted.

When you write a PDF library, there are design trade-offs all the way down, depending on use cases. (Just “in-memory” is already an important design trade-off, because the PDF format is intentionally designed to not require the whole PDF to be loaded into memory at once.) It would also be antithetical to preferring deep modules with minimal interfaces over shallow modules with broad interfaces [0]. Lastly, in managed…

Ah that reminds me of the days when I was viewing a large PDF (some instruction manual that's hundreds of pages long) and the pages appear in the browser as soon as they are downloaded.

Those are linearized PDFs [1]. Not all PDFs support streaming.

[1] https://developer.adobe.com/document-services/docs/overview/...

Re: Spotlight on pdfly, the Swiss Army knife for PDF files

#99

This is totally an aside, but I wonder how long the "Swiss army knife" metaphor will hang on in popular culture. People generally use it to indicate that something does a variety of things, but I'd say many of younger generation have never touched if even seen such a knife in their life, and even among older generations it doesn't have a positive connotation. Like when I hear something is the Swiss army knife of some…

Idioms can outlive their origins. People who never interact(ed) with a real SAK will pick up the meaning by osmosis.

After all, I’ve never handled a petard, but I like to deploy the phrase “hoist on his own petard”.

Re: Spotlight on pdfly, the Swiss Army knife for PDF files

#100
post #73

Earlier quoted context omitted.

Actually debugging a PDF parsing issue as we speak and actually started writing a parser (partially to understand the issue, partially as a last resort as the code in the parser I was debugging felt a bit shoddy). The PDF format is frankly quite horrible, extended over the years by kludges that feels more or less like premature optimizations in some cases and bloated overkill in others. While theoretically a nice ide…

You can do: cpdf -output-json in.pdf -o out.json (Modify out.json as liked) cpdf -j out.json -o out.pdf (Disclaimer, I wrote it.)

Seems cool for document usage, the online JS version however thrashed the digital signatures with that rotate 10 degrees demo (not entirely if it was just a checksum issue but it seemed to be worse as in tinkering with or not roundtripping the signature data object).
Post reply on HN