mikehaertl\wkhtmlto\Pdf::send PHP Method

send() public method

Send PDF to client, either inline or as download (triggers PDF creation)
public send ( string | null $filename = null, boolean $inline = false ) : boolean
$filename string | null the filename to send. If empty, the PDF is streamed inline.
$inline boolean whether to force inline display of the PDF, even if filename is present.
return boolean whether PDF was created successfully
    public function send($filename = null, $inline = false)
    {
        if (!$this->_isCreated && !$this->createPdf()) {
            return false;
        }
        $this->_tmpPdfFile->send($filename, 'application/pdf', $inline);
        return true;
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 public function send($filename = NULL)
 {
     return $this->pdf->send($filename);
 }