You are here

INSTALL.txt in Printer, email and PDF versions 5.4

INSTALLATION
------------

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).

Enable the print module: Administer > Site building > Modules
  (admin/build/modules)

PDF TOOL
--------

The print_pdf module requires the use of an external PDF generation tool.
The currently supported tools are dompdf, TCPDF and wkhtmltopdf.  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.

supported paths:
  * print module lib directory (usually sites/all/modules/print/lib)
  * libraries directory (sites/all/libraries)

dompdf support:
  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
  2. Extract the contents of the downloaded package into one of the
  supported paths.
  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.
  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.

TCPDF support:
  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/
  2. Extract the contents of the downloaded package into one of the
  supported paths.  There is no need to modify the config/tcpdf_config.php
  file, as the module self-configures TCPDF.
  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 one of the supported paths. 
  (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.

UPDATE
------

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.

ROBOTS
------

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:

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:

Disallow: /*/print$

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).

File

INSTALL.txt
View source
  1. INSTALLATION
  2. ------------
  3. Decompress the print-n.x-n.n.tar.gz file into your Drupal modules
  4. directory (usually sites/all/modules, see http://drupal.org/node/176044 for
  5. more information).
  6. Enable the print module: Administer > Site building > Modules
  7. (admin/build/modules)
  8. PDF TOOL
  9. --------
  10. The print_pdf module requires the use of an external PDF generation tool.
  11. The currently supported tools are dompdf, TCPDF and wkhtmltopdf. Please
  12. note that any errors/bugs in those tools need to be reported and fixed by
  13. their maintainers. DO NOT report bugs in those tools in the print module's
  14. issue queue at Drupal.org.
  15. supported paths:
  16. * print module lib directory (usually sites/all/modules/print/lib)
  17. * libraries directory (sites/all/libraries)
  18. dompdf support:
  19. The dompdf tool produces results that are more faithful to the HTML
  20. printer-friendly page. Unicode is not supported (only ISO-8859-1).
  21. This tool is not supported and there are several known bugs that result
  22. from its incomplete implementation.
  23. 1. Download dompdf from http://code.google.com/p/dompdf/downloads/list
  24. 2. Extract the contents of the downloaded package into one of the
  25. supported paths.
  26. 3. Check if dompdf_config.inc.php fits your installation. In 99% of cases,
  27. no changes are necessary, so just try to use it and only edit anything if
  28. the PDF generation fails.
  29. 4. Grant write access to the lib/fonts directory to your webserver user.
  30. 5. If you're using dompdf-0.5.1, delete the dompdf.php file as it contains
  31. a security vulnerability
  32. 6. If you're using dompdf-0.6 or later, you can try to enable the Unicode
  33. support, but you'll need to add some Unicode fonts. See
  34. http://groups.google.com/group/dompdf/browse_thread/thread/9f7bc0162b04d5cf
  35. for further info on this.
  36. 7. Check http://code.google.com/p/dompdf/ for further information.
  37. TCPDF support:
  38. TCPDF seems to be more actively developed than dompdf, but it's support
  39. for CSS is considerably worse. Unicode is supported (use of Unicode fonts
  40. result in HUGE files). Page header and footer are supported. This module
  41. requires TCPDF >= 4.0.000.
  42. 1. Download TCPDF from http://sourceforge.net/projects/tcpdf/
  43. 2. Extract the contents of the downloaded package into one of the
  44. supported paths. There is no need to modify the config/tcpdf_config.php
  45. file, as the module self-configures TCPDF.
  46. 3. Check http://tcpdf.sourceforge.net/ for further information.
  47. wkhtmltopdf support:
  48. 1. Download wkhtmltopdf from
  49. http://code.google.com/p/wkhtmltopdf/downloads/list. You can choose to
  50. download the source and compile it or simply download the static binary,
  51. which doesn't require you to complile anything.
  52. 2. Place the wkhtmltopdf executable into one of the supported paths.
  53. (usually sites/all/modules/print/lib). You can also place a symbolic link
  54. to the executable.
  55. 3. Check http://code.google.com/p/wkhtmltopdf/ for further information.
  56. UPDATE
  57. ------
  58. When updating from a previous version, just remove the print directory and
  59. follow the instructions above. Make sure that you backup any costumization
  60. to the print.tpl.php and print.css files.
  61. ROBOTS
  62. ------
  63. Even though it is possible to set per-page robots settings, the following
  64. can be placed in your robots.txt file after the User-agent line to prevent
  65. search engines from even asking for the page:
  66. Disallow: /print/
  67. Also, for updates from older versions (<=4.7.x-1.0 and <=5.x-1.2) which used
  68. node/nnn/print instead of print/nnn, the following lines can prevent
  69. requests from Google for the obsolete print URLs:
  70. Disallow: /*/print$
  71. Note that pattern matching in robots.txt is a Google extension (see
  72. http://www.google.com/support/webmasters/bin/answer.py?answer=40367 for more
  73. information).