Drupal: How To Create PDF Pages On A Site
In this article I would tell you how to create PDF-file of a page on your Drupal-based site. I propose you two solutions to do that below.
Generate PDF with the help of libHaru library
daylessday.org notifies that libHaru is available for download now.
the library abilities include:
* Generating of PDF with lines, text and pictures.
* Using of different character encodings: ISO8859-1~16, MSCP1250~8, KOI8-R.
* Deflate-decode documents compression.
* Embedding of fonts of Type1 and TrueType formats.
* An many others…
The library is free, open source and cross-platform.
Note: libHaru is installed on the server. This is not a PHP-library. If you can’t install anything to your server, this is not an option for you.
Use Printer-friendly Pages module
This module allows you to generate printer friendly versions of any node by navigating to www.example.com/print/nid, where nid is the node id of content to render.
A link is inserted in the each node (configurable in the content type settings), that opens a version of the page with no sidebars, search boxes, navigation pages, etc.
The 6.x version for Drupal 6 includes support for generating a PDF version also via the print_pdf module. Please follow the instructions in the INSTALL.txt carefully. PDF support is not usable out of the box. You must install a third-party tool!
By editing the default print.css (or specifying you own CSS file) or the print.tpl.php files, it is possible to change the look of the output page to suit your taste. For a more fine-grained customization, it is possible to use a print.node-type.tpl.php file located in either the current theme or the module directory.
The print_pdf module requires the use of an external PDF generation tool.
The currently supported tools are dompdf and TCPDF.Авторы решений:
Good Luck!