3 ms·
Here's what I'm using, albeit a different approach. I don't have thousands of docs to worry about, so I just want a quick preview to ensure the PDF is created a
by brbsix 11y ago
Here's what I'm using, albeit a different approach. I don't have thousands of docs to worry about, so I just want a quick preview to ensure the PDF is created as expected. https://gist.github.com/brbsix/546b732a9578343b114b425691c7906f https://gist.github.com/brbsix/546b732a9578343b114b425691c79...
Typical use would be `makepdf -o URL`. This saves the PDF in a temp folder, opens it to preview, then asks to save. If it encounters any fatal errors, it iterates through the available `wkhtmltopdf` binaries on PATH (I've got a couple) until it finds the first one that works.
Then there are a few options that can be added (ignore, lowquality, disable-javascript) and it will feed the appropriate option string for that version of `wkhtmltopdf` (since option strings may vary by version).