You are here

public function PdfBuilderInterface::getEntityRenderedAsPdf in Entity Print 8

Render any content entity as a PDF.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The content entity to render.

\Drupal\entity_print\Plugin\PdfEngineInterface $pdf_engine: The plugin id of the PDF engine to use.

bool $force_download: (optional) TRUE to try and force the PDF to be downloaded rather than opened.

bool $use_default_css: (optional) TRUE if you want the default CSS included, otherwise FALSE.

Return value

string FALSE or the PDF content will be sent to the browser.

1 method overrides PdfBuilderInterface::getEntityRenderedAsPdf()
EntityPrintPdfBuilder::getEntityRenderedAsPdf in src/EntityPrintPdfBuilder.php
Render any content entity as a PDF.

File

src/PdfBuilderInterface.php, line 28

Class

PdfBuilderInterface
Interface for the PDF builder service.

Namespace

Drupal\entity_print

Code

public function getEntityRenderedAsPdf(EntityInterface $entity, PdfEngineInterface $pdf_engine, $force_download = FALSE, $use_default_css = TRUE);