I am trying to hook into the Print module after to call a custom function after the pdf is generated. I've got this working by simply patching a call back on the wkhtmltopdf.pages.inc:
if (!empty($pdf)) {
_callback_for_pdf();
return $pdf;
}
This is pretty nasty. So ideally I would like to try and extend this contrib module to have a hook for this functionality.
How do I go about adding a hook to something to then use in a custom module?