public function TestPdfEngine::send in Entity Print 8
Send the PDF contents to the browser.
Parameters
$filename: (optional) The filename if we want to force the browser to download.
Throws
\Drupal\entity_print\PdfEngineException Thrown when PDF generation fails.
Overrides PdfEngineInterface::send
File
- tests/
modules/ entity_print_test/ src/ Plugin/ EntityPrint/ PdfEngine/ TestPdfEngine.php, line 32
Class
- TestPdfEngine
- Plugin annotation @PdfEngine( id = "testpdfengine", label= @Translation("Test PDF Engine") )
Namespace
Drupal\entity_print_test\Plugin\EntityPrint\PdfEngineCode
public function send($filename = NULL) {
// Echo the response and then flush, just like a PDF implementation would.
echo 'Using testpdfengine - ' . $this->configuration['test_engine_suffix'];
echo $this->html;
flush();
}