Printing
Posted: Sun Jun 24, 2012 7:37 am
Any quick/simple way to print?
I have played around with FPDF and read a few threads....kind of complicated, I managed to get to the stage where I have no errors but the page is completely blank? What part of the code actually prints fields/tables?
I have played around with FPDF and read a few threads....kind of complicated, I managed to get to the stage where I have no errors but the page is completely blank? What part of the code actually prints fields/tables?
- Code: Select all
<?php import('/fpdf/fpdf.php'); // Place your custom PDF class in another file and import it here
class dataface_actions_print_this_action {
function handle(&$params){
$app =& Dataface_Application::getInstance();
$query = $app->getQuery();
$query['-limit'] = 9999999;
$table =& Dataface_Table::loadTable($query['-table']);
$record =& $app->getRecord();
$pdfoutput = $record->val('orders');
$pdf=new FPDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('arial','',10);
$pdf->SetLeftMargin(15);
$pdf->MultiCell(0,5,$pdfoutput,0,1);
$pdf->Output();
}
}
?>