famelo/pdf
composer require famelo/pdf
Provides a quick and simple way to generate a PDF from a Fluid Template through the MPDF library
Readme excerpt
Famelo.PDFThis package provides a quick and simple way to generate a PDF from a Fluid Template through the MPDF library
Example:
$document = new \Famelo\PDF\Document('My.Package:SomeDocument'); $document->assign('someVariable', 'foobar'); // Trigger a Download and exit $document->download('SomeDocument ' . date('d.m.Y') . '.pdf'); // Show the document inline and exit $document->send(); // Save the document to a local file $document->save('/Some/Path/SomeDocument ' . date('d.m.Y') . '.pdf');This example will render a template located at 'resource://My.Package/Private/Documents/SomeDocument.html and convert it to PDF.
Page Format and o…Read more