Wednesday, October 13, 2010

Printer module and wkhtmltopdf tool for pdf version

If you want to generate the following printer-friendly versions of any node:
  • Printer-friendly version (webpage format) (at www.example.com/print/nid)
  • PDF version (at www.example.com/printpdf/nid)
  • Send by-email (at www.example.com/printmail/nid)
where nid is the node id of content to render,then follow these steps:

First of all download the "print" module from here http://drupal.org/project/print

Install and Enable the module.

Now for pdf version you need to install a third party tool called "wkhtmltopdf"

Download wkhtmltopdf from http://code.google.com/p/wkhtmltopdf/downloads/list. 
You can choose to download the source and compile it or simply download the static binary,which doesn't require you to complile anything.
 
Place the wkhtmltopdf executable into the path as "sites/all/modules/print/lib" 

Thats all,now go to admin->settings->print configure as you want :)

No comments:

Post a Comment