At first you should use
$pdf = $this->pack_module('Libs/TCPDF', null, null, 'L');
because of that:
public final function pack_module($module_type, $display_args=null, $function_name = null, $construct_args=null, $name=null) { .. }
and L - landscape is construct argument.
However with the solution below it doesn't matter as you'll have to create TCPDF object by yourself 🙂
At first - please review modules/Libs/TCPDF/TCPDF_0.php and functions set_title, set_subject. Maybe it'll be the solution?
If not... then - No you can't override Header and Footer, because Libs_TCPDF uses TCPDF class directly.
But you can replace tcpdf object with yours one.
Example:
$pdf = $this->pack_module('Libs/TCPDF', null, null, 'L');
if ($pdf->prepare()) {
// replace tcpdf object
$pdf->tcpdf = new Custom_MyModule_MyPDF(); // your custom class name in file modules/Custom/MyModule/MyPDF.php -- autoloader will do the rest
// print here as previously
...
}
$pdf->add_actionbar_icon('Print');
modules/Custom/MyModule/MyPDF.php
class Custom_MyModule_MyPDF extends TCPDF {
}
Regards,
Adam