On the topic of PDF generation, during my GitHub lurking I found another PDF / SilverStripe implementation using Flying Saucer - http://github.com/nyeholt/silverstripe-pdfrendition
No idea on the state of that but another example to try out :)
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
On the topic of PDF generation, during my GitHub lurking I found another PDF / SilverStripe implementation using Flying Saucer - http://github.com/nyeholt/silverstripe-pdfrendition
No idea on the state of that but another example to try out :)
We had similar troubles doing html-to-pdf conversion. In the recent past we've has some success using LiveDocX. It's a Zend Framework package. It requires you to start with a Docx file as a template...
summary - http://www.phpclasses.org/blog/post/103-New-approach-to-generate-PDF-using-PHP-with-Zend-Framework.html
details - http://www.phplivedocx.org/articles/pdf-generation-with-zend-framework/
-Billy
Hey Uncle Cheese - bumping this as it is rising in my todo list, any chance of the details of your, no doubt, excellent solution? :)
I ran into the same snarly mess that Uncle Cheese did of renaming files and classes to work with ManifestBuilder.
I just uploaded my version to SS and I'm posting here too - hopefully it will help someone out!
-John
OK, guys. I'll put this one on the frontburner for my next LeftAndMain tutorial. Thanks for your interest!
--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com
nice uncle cheese!
Using the smartpdf module
$pdf = new DOMPDF();
$html = "<head></head><body><p>Hello World</p></body></html>";
$pdf ->load_html($html);
$pdf->set_paper("letter", "portrait");
$pdf->render();
$pdf->stream("dompdf_out.pdf");
I get this error :
Fatal error: Class 'Frame_Tree' not found in /var/www/vhosts/website.com/httpdocs/smartpdf/code/include/Stylesheet.php on line 663
I've tested the DOMPDF package on my webserver as it's working fine, so I can't really see where I'm going wrong
I've tried http://github.com/nyeholt/silverstripe-pdfrendition. It's simple and the result is quite good but the pdf won't include images :(
I wish to try also smartpdf but cannot understand how to make it work. Any help?