README.txt 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. DESCRIPTION
  2. -----------
  3. This module allows you to generate the following printer-friendly versions
  4. of any node:
  5. * Web page printer-friendly version (at www.example.com/print/nid)
  6. * PDF version (at www.example.com/printpdf/nid)
  7. * Send by-email (at www.example.com/printmail/nid)
  8. where nid is the node id of content to render.
  9. A link is inserted in the each node (configurable in the content type
  10. settings), that opens a version of the page with no sidebars, search boxes,
  11. navigation pages, etc.
  12. INSTALLATION
  13. ------------
  14. Follow the instructions in the provided INSTALL.txt file.
  15. CONFIGURATION
  16. -------------
  17. - There are several settings that can be configured in the following places:
  18. Administration > Modules (admin/modules)
  19. Enable or disable the module. (default: disabled)
  20. Administration > People > Permissions (admin/people/permissions)
  21. Under print module:
  22. access print: Enable access to the PF page and display of the PF link in
  23. other pages. (default: disabled)
  24. administer print: Enable access to the module settings page. (default:
  25. disabled)
  26. Administration > Structure > Content types (admin/structure/types)
  27. For each content type it is possible to enable or disable the PF link
  28. via the "Show printer-friendly version link" checkbox. (default:
  29. enabled)
  30. It is also possible to enable or disable the PF link in individual
  31. comments via the "Show printer-friendly version link in individual
  32. comments" checkbox. (default: disabled)
  33. Administration > Configuration > User interface > Printer, email and PDF versions (admin/config/user-interface/print)
  34. This is where all the module-specific configuration options can be set.
  35. - To modify the template of printer friendly pages, simply edit the
  36. print.tpl.php or the css/print.css files.
  37. - It is possible to set per-content-type and/or theme-specific templates
  38. which are searched for in the following order:
  39. 1. print--[format]--node--[type].tpl.php in the theme directory
  40. 2. print--[format].tpl.php in the theme directory
  41. 3. print--node--[type].tpl.php in the theme directory
  42. 4. print.tpl.php in the theme directory
  43. 5. print.tpl.php in the module directory (supplied by the module)
  44. format is either html, mail or pdf, and type is Drupal's node type (e.g.
  45. page, story, etc.)
  46. API
  47. ---
  48. print_insert_link(), print_mail_insert_link(), print_pdf_insert_link()
  49. The *_insert_link functions are available to content developers that prefer
  50. to place the printer-friendly link in a custom location. It is advisable to
  51. disable the regular Printer-friendly link so that it is not shown in both
  52. locations.
  53. Calling the function like this:
  54. print_insert_link()
  55. will return the HTML for a link pointing to a Printer-friendly version of
  56. the current page.
  57. It is also possible to specify the link to the page yourself:
  58. print_insert_link("print/42")
  59. will return the HTML pointing to the printer-friendly version of node 42.
  60. THEMEABLE FUNCTIONS
  61. -------------------
  62. The following themeable functions are defined:
  63. * theme_print_format_link()
  64. * theme_print_mail_format_link()
  65. * theme_print_pdf_format_link()
  66. Returns an array of formatted attributes for the Printer-friendly
  67. link.
  68. * print_pdf_dompdf_footer($html)
  69. Format the dompdf footer contents
  70. * print_pdf_tcpdf_header($pdf, $html, $font)
  71. Format the TCPDF header
  72. * print_pdf_tcpdf_page($pdf)
  73. Format the TCPDF page settings (margins, etc)
  74. * print_pdf_tcpdf_content($pdf, $html, $font)
  75. Format the TCPDF page content
  76. * print_pdf_tcpdf_footer($pdf, $html, $font)
  77. Format the TCPDF footer contents
  78. * print_pdf_tcpdf_footer2($pdf)
  79. Format the TCPDF footer layout
  80. MORE INFORMATION
  81. ----------------
  82. For more information, consult the modules' documentation at
  83. http://drupal.org/node/190171.
  84. ACKNOWLEDGMENTS
  85. ---------------
  86. The print, pdf and mail icons are copyright Plone Foundation. Thanks for
  87. letting me use them!