Closed mattpr closed 10 months ago
Feel free to send in a PR supporting the features that you need. It's pretty simple to add new options.
Well to turn this into an actual qpdf "wrapper" would be a complete re-write/architecture: for wrappers it doesn't make sense to hard-code a bunch of js/ts code one-to-one to CLI features, but rather support more general APIs with parameter pass-through for less common cases.
Anyway, the point here was more that the readme and package name are both misleading. This isn't a qpdf wrapper, it is a pdf encryption/decryption lib that happens to use qpdf under the hood for those 2 functions.
I will open a PR for the README if you want. :)
Just trying to save other people looking for a qpdf wrapper from also wasting their time trying to figure out the wrapper APIs (that don't exist) due to this ^^^.
All good.
For instance I need to linearize a PDF. Read the top of your readme and figured this was the ticket.
The docs were sparse and I looked in the code and realized you only support encrypt and decrypt and there is no general wrapper pass-through type stuff to take care of managing running qpdf in flexible ways.
It would be nice if the top of the readme made it clear that this isn't a qpdf wrapper but rather a PDF encryption/decryption lib that happens to use qpdf under the hood.
Or maybe
?
Would be cool if the API was more generalized to support a fuller qpdf feature set with option overrides, etc...but none of us have enough time.
Maybe look at this one for inspiration? https://github.com/photostructure/exiftool-vendored.js