Commit ead90e4d authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Doc : ajout d'un exemple d'inclusion de CSS

parent 566cef04
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ public function pdfAction()
    /* @var $renderer \Laminas\View\Renderer\PhpRenderer */
    $renderer = $this->getServiceLocator()->get('view_renderer'); 
    $exporter = new \UnicaenPdf\Exporter\PdfExporter($renderer, 'A4', true);
    $exporter->addBodyHtml('<style>' . file_get_contents($cssFilePath) . '</style>');
    $exporter->addBodyHtml('<h1>Module UnicaenPdf</h1>');
    $exporter->addBodyHtml('<h2>Export PDF</h2>', false);
    $exporter->addBodyScript('application/demo/paragraphe.phtml', false);