/**
  * Renders a PDF using the Templating engine
  *
  * @param string $name       The name of the template
  * @param array $parameters  An array of parameters to pass to the template
  * @param array $options     Options to be used when creating the new PDF
  *
  * @return \TCPDF
  */
 public function renderPdf($name, array $parameters = array(), array $options = array())
 {
     $html = $this->templatingEngine->render($name, $parameters);
     $pdf = $this->pdfFactory->create($options);
     $pdf->writeHTML($html);
     return $pdf;
 }
 /**
  * Creates a new PDF with the given options
  *
  * @param array $options
  *
  * @return \TCPDF
  */
 protected function createPdf(array $options)
 {
     return $this->pdfFactory->create($options);
 }