本文整理汇总了PHP中Canvas::stream方法的典型用法代码示例。如果您正苦于以下问题:PHP Canvas::stream方法的具体用法?PHP Canvas::stream怎么用?PHP Canvas::stream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Canvas
的用法示例。
在下文中一共展示了Canvas::stream方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stream
/**
* Streams the PDF to the client
*
* The file will open a download dialog by default. The options
* parameter controls the output. Accepted options are:
*
* 'Accept-Ranges' => 1 or 0 - if this is not set to 1, then this
* header is not included, off by default this header seems to
* have caused some problems despite the fact that it is supposed
* to solve them, so I am leaving it off by default.
*
* 'compress' = > 1 or 0 - apply content stream compression, this is
* on (1) by default
*
* 'Attachment' => 1 or 0 - if 1, force the browser to open a
* download dialog, on (1) by default
*
* @param string $filename the name of the streamed file
* @param array $options header options (see above)
*/
function stream($filename, $options = null)
{
$this->save_locale();
$this->write_log();
if (!is_null($this->_pdf)) {
$this->_pdf->stream($filename, $options);
}
$this->restore_locale();
}
示例2: stream
/**
* Streams the PDF to the client
*
* The file will open a download dialog by default. The options
* parameter controls the output. Accepted options are:
*
* 'Accept-Ranges' => 1 or 0 - if this is not set to 1, then this
* header is not included, off by default this header seems to
* have caused some problems despite the fact that it is supposed
* to solve them, so I am leaving it off by default.
*
* 'compress' = > 1 or 0 - apply content stream compression, this is
* on (1) by default
*
* 'Attachment' => 1 or 0 - if 1, force the browser to open a
* download dialog, on (1) by default
*
* @param string $filename the name of the streamed file
* @param array $options header options (see above)
*/
function stream($filename, $options = null)
{
if (!is_null($this->_pdf)) {
$this->_pdf->stream($filename, $options);
}
}
示例3: stream
/**
* Streams the PDF to the client
*
* The file will always open a download dialog.
*
* @param string $filename the name of the streamed file
*/
function stream($filename)
{
if (!is_null($this->_pdf)) {
$this->_pdf->stream($filename);
}
}