/** * Returns the PDF as a string * * @param array $options Output options * @return string */ function output($options = null) { // Add page text $this->_add_page_text(); $debug = isset($options["compress"]) && $options["compress"] != 1; return $this->_pdf->output($debug); }
function out() { if (self::DEBUG) { echo __FUNCTION__ . "\n"; } return $this->canvas->output(); }
/** * Returns the PDF as a string * * @return string */ function output($options = null) { // Add page text $this->_add_page_text(); if (isset($options["compress"]) && $options["compress"] != 1) { $debug = 1; } else { $debug = 0; } return $this->_pdf->output($debug); }
include_once 'pdfClass/class.pdf.php'; $util = new Util(); //echo "JJJJJJJJJJJJJJJJJJJJ"; //$util->securAdmin($_SESSION); //echo "KKKKKKKKKKKKKK"; //exit; //$pdf = new Cpdf(array(0,0,684,297)); $pdf = new Cpdf(array(0, 0, 684, 297)); $pdf->selectFont('pdfClass/fonts/Helvetica'); for ($i = 1; $i <= $_POST[total]; $i++) { $login = $util->createPassword(); //$pass=$util->createPassword(); $sql = "insert into tbcard values('cardId','{$login}',NOW(),'{$balance}','1','none','')"; mysql_query($sql); //$util->insertAccount($login,$pass,$_POST[balance]); //echo "HHHH"; if ($i != 1) { $pdf->newPage(); } $pdf->addText(60, 235, 14, '<b>PREPAID CARD</b>'); $pdf->addText(60, 200, 12, '<b>Balance</b>: ' . number_format($_POST[balance], 2)); $pdf->addText(60, 160, 12, '<b>Code</b>: ' . $login); //$pdf->addText(40,190,12,'<b>Password</b>: '.$pass); } $pdfcode = $pdf->output(); @chmod("accounts", 777); $file = 'file-' . date('Ymd-his'); $fp = fopen('accounts/' . $file . '.pdf', 'wb'); fwrite($fp, $pdfcode); fclose($fp); header('location: accounts/' . $file . '.pdf');
/** * Returns the PDF as a string * * @return string */ function output() { //return $this->_pdf->ezOutput(1); return $this->_pdf->output(1); }