We've moved! You can find modules, themes and widgets on http://addons.silverstripe.org.
This page will no longer be updated, and disappear soon. Module maintainers, please read our announcement to find out how to add your modules there.

PDF Rendition

Maintainer(s): Marcus
Supported by: Community

Allows the easy rendition of HTML pages and fragments into PDFs. Uses the Flying Saucer project to convert HTML+CSS to PDFs http://code.google.com/p/flying-saucer/

PDF Renditions in SilverStripe (using XHTMLRenderer)

You must have java installed on the server where SilverStripe is installed, as the PDF Rendition module uses a java application to actually perform the translation from HTML to PDF.

For best results, you should have the PHP tidy module enabled. If this isn't possible, you will need to have the standalone tidy binary available.

Please check the official userguide when trying to figure out how to do something, or the main project page. Note that the user guide can be downloaded in PDF form, so anything you see in the PDF can be figured out by looking at the HTML + CSS source of the userguide linked above (eg table of contents, headers and footers).

Quick PDFs

Add the following to your mysite/_config.php file

Object::add_extension('Page_Controller', 'PdfControllerExtension');

Now, add the following to themes//templates/Page.ss just below the $Layout variable

<a href="$PDFLink">PDF</a>

When you reload your frontend page, you should now have a link pointing to a pdf file; clicking that will generate a PDF version of the page and stream it to the browser.


Module screenshot


  • Latest master build

    To get a preview of our next release, download the latest build of unstable git master branch here. Please be careful: this is more likely to contain bugs, especially on modules undergoing a lot of development.

    SHA hash: cb38c72c28eac952f30d3c2a7fa4ca1b0bac8661
    Build Date: 2013-08-20
    Download: silverstripe-pdfrendition-master-HEAD.tar.gz

    Unstable Git access: git://github.com/nyeholt/silverstripe-pdfrendition.git


Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.