generatePdf() public method

Print an article as PDF and stream it to the browser
public generatePdf ( )
Example #1
0
 /**
  * Print an article as PDF and stream it to the browser
  *
  * @param \ModuleModel $objArticle An article object
  *
  * @deprecated Deprecated since Contao 4.0, to be removed in Contao 5.0.
  *             Use ModuleArticle->generatePdf() instead.
  */
 protected function printArticleAsPdf($objArticle)
 {
     trigger_error('Using Controller::printArticleAsPdf() has been deprecated and will no longer work in Contao 5.0. Use ModuleArticle->generatePdf() instead.', E_USER_DEPRECATED);
     $objArticle = new \ModuleArticle($objArticle);
     $objArticle->generatePdf();
 }