I use the wkhtmltopdf library with tokens in the header text.
If a value is not available, the token is not replaced.
I solved this problem by changing line 30 of lib_handlers\print_pdf_wkhtmltopdf\print_pdf_wkhtmltopdf.pages.inc. by adding the option array('clear'=>true). See http://api.drupal.org/api/drupal/includes!token.inc/function/token_repla... for documentation.
$wkhtmltopdf_options = token_replace($wkhtmltopdf_options, array('node' => $meta['node']), array('clear'=>true));
Comments
Comment #1
jcnventuraComment #2
jcnventuraThanks for the suggestion.. There were a few more places where that clear flag was useful.
http://drupalcode.org/project/print.git/commit/eaa3d3d