Hi!
I would like to make some deeper customization, add full page background, change margins etc.
I was trying to cover the functions from print_pdf.pages.inc in my template template.php (eg. ttsr_print_pdf_tcpdf_header), but I get an error:
Fatal error: Call to a member function setHeaderFont() on a non-object in /sites/all/themes/ttsr/template.php on line 170
template.php:170:
$pdf->setHeaderFont($font);
I use TCPDF.
What I did wrong?
Thanks for your help.
Comments
Comment #1
wisniewski commentedI have also added hook_theme to my ZEN subtemplate:
function ttsr_theme(&$existing, $type, $theme, $path) {
$hooks['print_pdf_tcpdf_header'] = array(
'arguments' => array('pdf' => NULL, 'html' => '', 'font' => array()),
);
return $hooks;
}
Do you know how to deal with it? (I don't want to modify oryginal print module)
Comment #2
jcnventuraYou seem to be using the D6 theme array, with the D7 module.. your theme array should use 'variables' instead of 'arguments',
Also, make sure that you do like the module in your theme function, and start the code with
$pdf = $vars['pdf'];Comment #3
jcnventuraNo further info in more than two weeks. Closing the issue.
Comment #4
ivex commentedSorry to ask over this closed issue but I am trying to do the same. I have created a webform submission and I want to modify a lot from it. I have tried to create a new header and footer for the tcpdf but nothing works. Can you please help me out. I would really appreciate any guidance