You are here

public function DomPdfGenerator::__construct in PDF Generator 8

Same name and namespace in other branches
  1. 2.0.x src/DomPdfGenerator.php \Drupal\pdf_generator\DomPdfGenerator::__construct()

Constructs a new object.

Parameters

\Drupal\Core\Render\Renderer $renderer: The object renderer.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The current request stack.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

File

src/DomPdfGenerator.php, line 68

Class

DomPdfGenerator
Defines helpers methods to help in managing config which used in SCity.

Namespace

Drupal\pdf_generator

Code

public function __construct(Renderer $renderer, RequestStack $request_stack, ModuleHandlerInterface $module_handler) {
  $this->renderer = $renderer;
  $this->requestStack = $request_stack;
  $this->moduleHandler = $module_handler;
  $this->options = new Options();
  $this->options
    ->set('enable_css_float', TRUE);
  $this->options
    ->set('enable_html5_parser', TRUE);
  $this->options
    ->set('enable_remote', TRUE);
  $this->options
    ->set('defaultFont', 'Times');
}