当前位置: 首页>>代码示例>>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;未经允许,请勿转载。