dev-master
9999999-devSilverStripe PDF Generation via DOMPDF Library
The Requires
0.0.1
0.0.1.0SilverStripe PDF Generation via DOMPDF Library
The Requires
SilverStripe PDF Generation via DOMPDF Library
This is a fork of https://github.com/burnbright/silverstripe-dompdf for use with Composer., (*1)
Maintainer: Jeremy Shipman (jeremy@burnbright.net), (*2)
Makes use of: https://github.com/dompdf/dompdf Dompdf websites: http://dompdf.github.com/, http://pxd.me/dompdf/www/, (*3)
Input:, (*4)
Output, (*5)
Composer
- On the command line, cd into your sites root folder
- Run
composer require gdmedia/silverstripe-dompdf
- Run dev/build?flush=all in your browser
Manually
- Download the module from https://github.com/guru-digital/silverstripe-dompdf/archive/master.zip
- Extract the files into your silverstripe root folder
- Run dev/build?flush=all in your browser
$pdf = new SS_DOMPDF(); $pdf->setHTML($mydataobject->renderWith('MyTemplate')); $pdf->render(); $pdf->toFile('mypdf.pdf');
The $pdf->streamdebug(); function is useful for quickly viewing pdfs, particularly if your browser supports displaying pdfs, rather than downloading., (*6)
You can check your html before it is converted like this:, (*7)
echo $mydataobject->renderWith('MyTemplate');die();
SilverStripe PDF Generation via DOMPDF Library
SilverStripe PDF Generation via DOMPDF Library