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

drupert55’s picture

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.

mugginsoft.net’s picture

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.

botris’s picture

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

Anonymous’s picture

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.

robives’s picture

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

gouky10’s picture

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

hondaman900’s picture

I have a page that I want saved as PDF. Your module with dompdf does an excellent job, but I have a view in block form in the content region of the page to be made into a PDF. The node's own native content gets rendered in the PDF but the block is omitted. The PDF/email/print buttons appear at the bottom of the HTML content above the block, not as expected at the end of the page and include the block in the PDF output.

I have tried the suggestion about editing print.tpl.php at https://www.drupal.org/node/190173#contentblocks but can't get it to make any difference.

Is there a way to create a PDF to show the page as it looks on the webpage?

Thanks in advance for your reply.

phponwebsites’s picture

Is it possible to add different css files based on format?

drupal_lib’s picture

I have a question about enabling the PF link. I am going to Administer > Content management > Content types (admin/content/types) per the instructions and when I access a content type (such as page), I don't see the option to enable the link. I am on Drupal 7 using Open Office theme.

Thanks for any suggestions.

AdamPS’s picture

You need to enable the sub-module print_ui to get the links.

This is mentioned in the previous page https://www.drupal.org/node/306882, but it took me a while to find too - it's not obvious. I've raised an issue here #2723861: Not clear enough that sub-module print_ui should be installed to ask for clearer documentation.