本文整理匯總了PHP中Cpdf::output方法的典型用法代碼示例。如果您正苦於以下問題:PHP Cpdf::output方法的具體用法?PHP Cpdf::output怎麽用?PHP Cpdf::output使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Cpdf
的用法示例。
在下文中一共展示了Cpdf::output方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: output
/**
* 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);
}
示例2: out
function out()
{
if (self::DEBUG) {
echo __FUNCTION__ . "\n";
}
return $this->canvas->output();
}
示例3: 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);
}
示例4: Util
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');
示例5: output
/**
* Returns the PDF as a string
*
* @return string
*/
function output()
{
//return $this->_pdf->ezOutput(1);
return $this->_pdf->output(1);
}