You are here

function hook_entity_print_pdf_alter in Entity Print 7

Allows other modules to get hold of the pdf object for making changes.

Only use this function if you're not able to achieve the right outcome with a custom template and CSS.

Parameters

\WkHtmlToPdf $pdf: The pdf object.

string $entity_type: The entity type of the entity we're rendering.

object $entity: The entity we're rending.

File

./entity_print.api.php, line 45
This file exists only to provide examples of using the Entity Print API's.

Code

function hook_entity_print_pdf_alter(WkHtmlToPdf $pdf, $entity_type, $entity) {
  $terms = variable_get('terms_and_conditions', '');
  $pdf
    ->addPage($terms);
}