PDF Version

Categories

Component ID

2297337

Component name

PDF Version

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

2004

Component created

Component changed

Component body

Simple module that uses PhantomJS to generate a PDF version of any Drupal page.

For example for a PDF version of http://site.com/blog you would link to http://site.com/pdf-version/blog.

The PhantomJS script is generated from a Drupal render array, so you can use hook_preprocess_pdf_version_phantomjs_script() to make modifications to some of the settings already exposed. Alternatively, copy the pdf-version-phantomjs-script.tpl.php to your theme and modify the script.

The request that PhantomJS does now uses the session id of the original calling user which allows the requests from PhantomJS to access private pages in the scope of the calling user. This may cause issues if your site performs security checks related to who can use a given session id - eg if you log out a user if the IP address changes during a session.