Proposed new hook: `hook_civicrm_pdfconfig`
Tonight I was working on differences in rendering output between
wkhtmltopdf. I ended up down quite the rabbit hole and found out that there's no reliable way to get certain settings (e.g. font size) to work reliably across different
wkhtmltopdf versions and even OSes.
We use the
snappy package, which is a PHP wrapper around
wkhtmltopdf, and I was able to solve my problem by hacking a core file to insert the line:
However, this line can't be committed to core, since it will break folks with older versions of
wkhtmltopdf and probably Civi running on Windows/MacOS servers.
So instead I think a hook, which passes the
DOMPDF) object, is the best solution. I can write this if it's approved.