INSTALL.txt 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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: Administration > Modules (admin/modules)
  7. PDF TOOL
  8. --------
  9. The print_pdf module requires the use of an external PDF generation tool.
  10. The currently supported tools are dompdf, TCPDF and wkhtmltopdf. Please
  11. note that any errors/bugs in those tools need to be reported and fixed by
  12. their maintainers. DO NOT report bugs in those tools in the print module's
  13. issue queue at Drupal.org.
  14. supported paths:
  15. * print module lib directory (usually sites/all/modules/print/lib)
  16. * libraries directory (sites/all/libraries)
  17. dompdf support:
  18. The dompdf tool produces results that are more faithful to the HTML
  19. printer-friendly page. Good support of CSS 2.1 and partially CSS3.
  20. 1. Download dompdf from http://code.google.com/p/dompdf/downloads/list
  21. 2. Extract the contents of the downloaded package into one of the
  22. supported paths.
  23. 3. Check if dompdf_config.inc.php fits your installation. In 99% of cases,
  24. no changes are necessary, so just try to use it and only edit anything if
  25. the PDF generation fails.
  26. 4. Grant write access to the lib/fonts directory to your webserver user.
  27. 5. If you're using dompdf-0.5.1, delete the dompdf.php file as it contains
  28. a security vulnerability
  29. 6. If you're using dompdf-0.6 or later, you can try to enable the Unicode
  30. support, but you'll need to add some Unicode fonts. See
  31. http://groups.google.com/group/dompdf/browse_thread/thread/9f7bc0162b04d5cf
  32. for further info on this.
  33. 7. Check http://code.google.com/p/dompdf/ for further information.
  34. TCPDF support:
  35. TCPDF's support for CSS is considerably worse than the other tools.
  36. Unicode is supported (use of Unicode fonts result in HUGE files). Page
  37. header and footer are supported. This module requires TCPDF >= 5.9.012.
  38. 1. Download TCPDF from http://sourceforge.net/projects/tcpdf/
  39. 2. Extract the contents of the downloaded package into one of the
  40. supported paths. There is no need to modify the config/tcpdf_config.php
  41. file, as the module self-configures TCPDF.
  42. 3. Grant write access to the cache and images directories to your
  43. webserver user.
  44. 4. Check http://tcpdf.sourceforge.net/ for further information.
  45. wkhtmltopdf support:
  46. wkhtmltopdf is a webkit-based tool that actually is a browser in order to
  47. generate the PDF. Resource hungry: expect to need some 30Mb+ of RAM and
  48. some seconds of CPU power. The static binaries may need additional
  49. libraries in your site, which may present problems in shared hosting
  50. environments. The best, if you can run it.
  51. 1. Download wkhtmltopdf from
  52. http://code.google.com/p/wkhtmltopdf/downloads/list. You can choose to
  53. download the source and compile it or simply download the static binary,
  54. which doesn't require you to compile anything. Note that the compiled
  55. version may require a running X server (static uses patched libs that can
  56. work without one).
  57. 2. Place the wkhtmltopdf executable into one of the supported paths.
  58. (usually sites/all/modules/print/lib). You can also place a symbolic link
  59. to the executable.
  60. 3. Check http://code.google.com/p/wkhtmltopdf/ for further information.
  61. UPDATE
  62. ------
  63. When updating from a previous version, just remove the print directory and
  64. follow the instructions above. Make sure that you backup any costumization
  65. to the print.tpl.php and print.css files.
  66. ROBOTS
  67. ------
  68. Even though it is possible to set per-page robots settings, the following
  69. can be placed in your robots.txt file after the User-agent line to prevent
  70. search engines from even asking for the page:
  71. Disallow: /print/