Community Documentation

Print: 2. Configuration

Last updated August 16, 2011. Created by jcnventura on September 11, 2008.
Log in to edit this page.

Configuration

  • There are several settings that can be configured in the following places:
  • Administer > Site building > Modules (admin/build/modules)
    Enable or disable the module. (default: disabled)
    Administer > User management > Permissions (admin/user/permissions)
    Under print module:
    access print: Enable access to the PF page and display of the PF link in other pages. (default: disabled)
    administer print: Enable access to the module settings page. (default: disabled)
    Administer > Content management > Content types (admin/content/types)
    For each content type it is possible to enable or disable the PF link via the "Show printer-friendly version link" checkbox. (default: enabled)
    It is also possible to enable or disable the PF link in individual comments via the "Show printer-friendly version link in individual comments" checkbox. (default: disabled)
    Administer > Site configuration > Printer-friendly (admin/settings/print)
    This is where all the module-specific configuration options can be set.
  • To modify the template of printer friendly pages, simply edit the print.tpl.php or the css/print.css files.
  • It is possible to set per-content-type and/or theme-specific templates which are searched for in the following order :
    • Drupal 5.x and 6.x (the directory order may not be totally correct for 6.x)
      1. print_[format].node-[type].tpl.php in the theme directory
      2. print_[format].node-[type].tpl.php in the module directory
      3. print_[format].tpl.php in the theme directory
      4. print_[format].tpl.php in the module directory
      5. print.node-[type].tpl.php in the theme directory
      6. print.node-[type].tpl.php in the module directory
      7. print.tpl.php in the theme directory
      8. print.tpl.php in the module directory (supplied by the module)
    • Drupal 7.x
      1. print--[format]--node--[type].tpl.php in the theme directory
      2. print--[format].tpl.php in the theme directory
      3. print--node--[type].tpl.php in the theme directory
      4. print.tpl.php in the theme directory
      5. print.tpl.php in the module directory (supplied by the module)

    Where [format] is one of html, mail or pdf and [type] is the Drupal content type machine name (e.g. story, article).

Comments

Hello.

Is there a way to expand to guests, the 'Hourly threshold' in the e-mail feature e.g. via IP Address or cookie? If so, how?

(Administer » Site configuration » Printer, e-mail and PDF versions => e-mail)

Thanks in advance.

EDIT: Also / or restrict by role would be good.

Path to print template files

Note that from at least 6.x-1.11 on the print template files must be in the same folder as the page.tpl.php template file.

In my case I put my templates in a hierarchy (theme/templates/pages, theme/templates/nodes, theme/templates/forms etc).
So the print templates must go in theme/templates/pages otherwise they are not discovered.

Thanks, just wasted an hour

Thanks, just wasted an hour on that. I had put it in my template/node

Hey , not sure if i am

Hey , not sure if i am missing something here but in the module it states under the PDF tab in the administration section it states

No PDF generation tool found! Please dowload a supported PHP PDF generation tool. Check this module's INSTALL.txt for more details.

In the INSTALL.txt i did not see any information with regards to this or on these document pages. Any help in setting this up would be much appreciated.

Download TCPDF form here:

Download TCPDF form here: http://www.tcpdf.org/

Copy the files to "sites/all/libraries/" directory in the Drupal directory. You should see the PDF generation tool now.
Hope that helps.

Rob

Template for a non-content type

Hello is there any way to edit the print template for my own module path like: "mysite.com/admin/mymodule" ? I tried to create a print.tpl.php in the same directory of my module but it didn't work.
Thank you for your response, I apreciate your work

About this page

Drupal version
Drupal 4.7.x, Drupal 5.x, Drupal 6.x

Site Building Guide

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here