class PDF extends PDF_JavaScript
{
function AutoPrint($dialog=false)
{
//Open the print dialog or start printing immediately on the standard printer
$param=($dialog ? 'true' : 'true');
$script="print($param);";
$this->IncludeJS($script);
}
}
.
.....
$pdf->AutoPrint(true);
$pdf->output;