Skip to content
INSTALL.txt 3.61 KiB
Newer Older
João Ventura's avatar
João Ventura committed
INSTALLATION
------------
João Ventura's avatar
João Ventura committed
Decompress the print-n.x-n.n.tar.gz file into your Drupal modules
directory (usually sites/all/modules, see http://drupal.org/node/176044 for
more information).
João Ventura's avatar
João Ventura committed
Enable the print module: Administer > Site building > Modules
  (admin/build/modules)
João Ventura's avatar
João Ventura committed
PDF TOOL
--------

The print_pdf module requires the use of an external PDF generation tool.
João Ventura's avatar
João Ventura committed
The currently supported tools are dompdf and TCPDF. Please note that any
errors/bugs in those tools need to be reported and fixed by their
maintainers. DO NOT report bugs in those tools in the print module's issue
queue at Drupal.org.
João Ventura's avatar
João Ventura committed
  The dompdf tool produces results that are more faithful to the HTML
  printer-friendly page. Unicode is not supported (only ISO-8859-1).
  This tool is not supported and there are several known bugs that result
  from its incomplete implementation.
  1. Download dompdf from http://code.google.com/p/dompdf/downloads/list
João Ventura's avatar
João Ventura committed
  2. Extract the contents of the downloaded package into the print module
  lib directory (usually sites/all/modules/print/lib)
João Ventura's avatar
João Ventura committed
  3. Check if dompdf_config.inc.php fits your installation. In 99% of cases,
  no changes are necessary, so just try to use it and only edit anything if
  the PDF generation fails.
  4. Grant write access to the lib/fonts directory to your webserver user.
João Ventura's avatar
João Ventura committed
  5. If you're using dompdf-0.5.1, delete the dompdf.php file as it contains
  a security vulnerability
  6. If you're using dompdf-0.6 or later, you can try to enable the Unicode
  support, but you'll need to add some Unicode fonts. See 
  http://groups.google.com/group/dompdf/browse_thread/thread/9f7bc0162b04d5cf
  for further info on this.
  7. Check http://code.google.com/p/dompdf/ for further information.
João Ventura's avatar
João Ventura committed
  TCPDF seems to be more actively developed than dompdf, but it's support
  for CSS is considerably worse. Unicode is supported (use of Unicode fonts
  result in HUGE files). Page header and footer are supported. This module
  requires TCPDF >= 4.0.000.

  1. Download TCPDF from http://sourceforge.net/projects/tcpdf/
João Ventura's avatar
João Ventura committed
  2. Extract the contents of the downloaded package into the print module
  lib directory (usually sites/all/modules/print/lib). There is no need to
  modify the config/tcpdf_config.php file, as the module self-configures
  TCPDF.
João Ventura's avatar
João Ventura committed
  3. Check http://tcpdf.sourceforge.net/ for further information.
wkhtmltopdf support:

  1. 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.
  2. Place the wkhtmltopdf executable into the print module lib directory
  (usually sites/all/modules/print/lib). You can also place a symbolic link
  to the executable.
  3. Check http://code.google.com/p/wkhtmltopdf/ for further information.
João Ventura's avatar
João Ventura committed
UPDATE
------
João Ventura's avatar
João Ventura committed

João Ventura's avatar
João Ventura committed
When updating from a previous version, just remove the print directory and
follow the instructions above. Make sure that you backup any costumization
to the print.tpl.php and print.css files.
João Ventura's avatar
João Ventura committed

João Ventura's avatar
João Ventura committed
ROBOTS
------
João Ventura's avatar
João Ventura committed

João Ventura's avatar
João Ventura committed
Even though it is possible to set per-page robots settings, the following
can be placed in your robots.txt file after the User-agent line to prevent
search engines from even asking for the page:
João Ventura's avatar
João Ventura committed

João Ventura's avatar
João Ventura committed
Disallow: /print/

Also, for updates from older versions (<=4.7.x-1.0 and <=5.x-1.2) which used
node/nnn/print instead of print/nnn, the following lines can prevent
requests from Google for the obsolete print URLs:
km's avatar
km committed

João Ventura's avatar
João Ventura committed
Disallow: /*/print$
km's avatar
km committed

João Ventura's avatar
João Ventura committed
Note that pattern matching in robots.txt is a Google extension (see
http://www.google.com/support/webmasters/bin/answer.py?answer=40367 for more
information).
João Ventura's avatar
João Ventura committed

João Ventura's avatar
João Ventura committed
// $Id$