예제 #1
0
 /**
  * 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();
 }
 /**
  * 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
0
 /**
  * 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);
     }
 }