當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Cpdf::stream方法代碼示例

本文整理匯總了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);
 }
開發者ID:skyosev,項目名稱:OpenCart-Overclocked,代碼行數:13,代碼來源:cpdf_adapter.cls.php

示例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();
開發者ID:Bloodknight,項目名稱:notepad-generator,代碼行數:30,代碼來源:notepaper.php

示例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);
 }
開發者ID:andrewroth,項目名稱:c4c_intranet,代碼行數:11,代碼來源:cpdf_adapter.cls.php


注:本文中的Cpdf::stream方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。