,'InKrSumma'=>array('justification'=>'right') ,'InKr'=>array('justification'=>'right') ,'Admin'=>array('justification'=>'right') ) )); $result2 = $db->Query($ds['QueryTotal'] . " LIMIT 0,2000"); $row = $db->GetRow($result2); $row['OutKr'] = number_format($row['OutKr'],2,',','.'); $data[] = $row; $pdf->ezText("<i>Antal poster:</i> ".$row['items']." <i>Outkr Total:</i> ".$row['OutKr'],12,array('justification'=>'center')); function doHeader($pdf,$pageno,$pages) { $text = 'Sida '.$pageno.' av '.$pages; $pdf->addText(($pdf->ez['pageWidth'] / 2)-strlen($text), 12, 9, $text); } $pdf->siHeadersAndFooters(array('AllPages'=>'doHeader')); $pdf->doHeader('Utskrift '.date('Y-m-d'),10,'left'); $pdf->doHeader("<b>Trosgnistan</b>",10,'right'); $pdf->doFooter("<b>Trosgnistan</b>",10,'right'); $pdf->doFooter('Utskrift '.date('Y-m-d'),10,'left'); header('connection:close'); //following causes pdf to be displayed inside an iframe! //Content-Disposition: inline; filename="doc.pdf"; header("Content-Disposition:attachment;filename=Utbetalningar_".$_REQUEST['Date'].".pdf"); header("Content-type: application/x-pdf"); print $pdf->ezOutput(); //$pdf->ezStream();