2 ms·
What options did you settle on? I have used it in production for chopping up roughly 35,000 documents (and counting) and I have somewhat bare-bones options. He
by NDizzle 11y ago
What options did you settle on? I have used it in production for chopping up roughly 35,000 documents (and counting) and I have somewhat bare-bones options.
Here's what my code looks like: http://pastebin.com/KB15Q6GM http://pastebin.com/KB15Q6GM
I'm only really using --disable-internal-links and --no-outline, but sometimes I force a stylesheet.
- brbsix 11y agoHere'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).