本文整理匯總了PHP中Cpdf::stream方法的典型用法代碼示例。如果您正苦於以下問題:PHP Cpdf::stream方法的具體用法?PHP Cpdf::stream怎麽用?PHP Cpdf::stream使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Cpdf
的用法示例。
在下文中一共展示了Cpdf::stream方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: stream
/**
* Streams the PDF directly to the browser
*
* @param string $filename the name of the PDF file
* @param array $options associative array, 'Attachment' => 0 or 1, 'compress' => 1 or 0
*/
function stream($filename, $options = null)
{
// Add page text
$this->_add_page_text();
$options["Content-Disposition"] = $filename;
$this->_pdf->stream($options);
}
示例2: date
//| DRAW THE PAGE HEADER TEXT
//+----------------------------------------------------------------------+
// User-Input: Name
$pdf->addText($left_margin, 810, 10, strip_tags(stripslashes($_GET['my_name'])), 0, 0);
// User-Input: Phone
$pdf->addText($left_margin, 797, 10, strip_tags($_GET['my_phone']), 0, 0);
// User-Input: Project
$text_height_project = $note_section_height + 22;
$pdf->addText($left_margin, $text_height_project, 10, "PROJECT:", 0, 0);
$pdf->addText(100, $text_height_project, 10, strip_tags(stripslashes($_GET['my_project'])), 0, 0);
// Month and Year
if (isset($_GET['show_page_number']) && $_GET['show_page_number'] == "on") {
$pdf->addText(510, $text_height_project, 10, "PAGE:", 0, 0);
}
// Month and Year
if (isset($_GET['show_date']) && $_GET['show_date'] == "on") {
$pdf->addText(getXfromRightMargin(date($_GET['my_date_format']), 8), 810, 8, date($_GET['my_date_format']), 0, 0);
}
//+----------------------------------------------------------------------+
//| DRAW THE FOOTER
//+----------------------------------------------------------------------+
$pdf->addText($left_margin, 20, 6, "Notepad Generator by Mike Botsko; www.botsko.net", 0, 0);
// Month and Year
if (isset($_GET['my_footer'])) {
$pdf->addText($left_margin, 10, 6, stripslashes($_GET['my_footer']), 0, 0);
}
//+----------------------------------------------------------------------+
//| GENERATE THE PDF
//+----------------------------------------------------------------------+
$pdf->stream();
示例3: stream
/**
* Streams the PDF directly to the browser
*
* @param string $filename the name of the PDF file
* @param array $options associative array, 'Attachment' => 0 or 1, 'compress' => 1 or 0
*/
function stream($filename, $options = null)
{
$options["Content-Disposition"] = $filename;
$this->_pdf->stream($options);
}