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