Important
wkhtmltopdf has been abandoned and is not being updated anymore. Avoid using it for new projects.
Tip
Consider using Chrome in headless mode and just DIY-ing it instead of wkhtmltopdf:
google-chrome --headless --disable-gpu --run-all-compositor-stages-before-draw --print-to-pdf={$tempPath} --no-pdf-header-footer {$renderUrl}