本文整理汇总了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);
}