Drupal 7 Printer, Email, and PDF Versions Module

Hello there everyone and welcome to another Daily Dose of Drupal, today we’re on Episode Number 69, as always I’m Shane, you can go ahead and follow me on Twitter @smthomas3 or hop back onto the Code Karate website and sign up for the newsletter if you haven’t already.

Today we’re going to be going over a module that I’ve used quite frequently and it is the Printer E-mail and PDF Versions Module, it’s that drupal.org/project.print. This is a great module if you want users of your website to be able to either print out the web page in a nicely formatted fashion or if you want them to be able to e-mail the webpage to a friend or themselves or also if you want them to be able to download it a PDF version of the web page.

I’m only going to go over the Printer and E-mail versions today; the PDF Version requires you to install a 3rd party PDF generation tools or one of the PDF generation tools. The one that I have at the most success with and I would recommend is the WK HTML to PDF I guess it’s what it is called and I will probably be putting a blog post together on codekarate.com in the next week or so with details of how to get that installed because there have been a few questions that I’ve noticed and that I ran into when I was getting it installed for the first time but today we’re only going over the Printer and E-mail portion of this module.

So I went ahead and I have my test site here and you can see that I already have the modules downloaded, I do not have the PDF version one enabled but I have a printer friendly pages and the send it by e-mail modules enabled from this Print Module on drupal.org so I’ll go ahead and click on Configure and I’ll start with the settings.

This allows you to set up a custom style sheet so if you want to use a different styles on your either the e-mail that get sent or the print version more likely, you can go ahead and use that, use a custom style sheet here so you can change it to look the way you want to, you can also have it keep the current scheme CSS and there’s a whole bunch of little options here and options for the logo so you can have it Hide the Logo or show a different logo, different footer options which your default is using the site’s footer and if you just wanted to just play the source URL, bunch of different things, you can also change it, change the text so it allows you to change the text strings that are displayed.

So when you want to view a printable copy of the webpage there’s a webpage options here, it allows you to specify where you want this link to show up, by default it will show in the links area of any content type, it also can be in the help area or in a custom block and I’ll show you that as well, it gives you specific classes and you can specify a specific link feasibility and just … you can have it open in a new window, there’s a whole bunch of different configuration options, both of these; the Webpage, E-mail and the PDF Version if you use that have a lot of configuration options.

The e-mail looks very similar, a lot of same type of things so I’ll go ahead and show you how it works. Right after I installed it I simply go to a test article here, just this is an article content type if you scroll down you’ll see that there’s a printer friendly version and send by e-mail.

If you did have the PDF version module it would show up right next to it. By clicking the Printer Friendly version it goes ahead and brings me to a new page, it’s /print/ the node ID and it just has the text of the site as the footer of the website, it also gives me the source URL, it shows the logo up here, pretty straight forward an as you can all of course use the settings to change this up a little bit or use the custom style sheet.

The Send by E-mail will actually allow you to specify an e-mail address to send it to, subject; it links it to whichever page you’re going to send and then you can send a message and this will actually shoot an e-mail over to any e-mail address listed in this Send it To field.

So the basics are all there, if you want to customized the content types you can come in to … I’ll say article and there’s a printer e-mail on PDF version option here so you can say for example if you want to not show the Send By E-mail link, you can save that and this is only for the article content type, of course you can reset this for any content type. If I come back to the home page going to test article you could still see the Printer Friendly version but the Send By E-Mail link is no longer available.

There’s also a printer e-mail and PDF versions block which we’ll go ahead and put in the side bar here just to show how that works, you can save that. So there’s a printer friendly version of the page, if I go back to the content type and I turn on this Send by E-Mail option, save it and come back you’ll notice I have the Send by E-Mail link showing up in this block as well.

So it’s a really easy module to get going especially if you want to allow user to either send an e-mail with that page to either themselves or to a friend and to also allow users to more easily print out a version of the page.

So if you have content that you know users are going to need to print or maybe saved as a PDF or Send as an E-Mail this module is the first place I would start, it’s very configurable, it allows you to add your own custom style sheets, whatever you might need in order to make the module look and work correctly, it also is very flexible as far as building out template files so for instance you can build out specific print template files for either it’s HTML, Send an E-Mail or PDF version and for a specific node types so it makes it extremely flexible for building out anything you might need to print or save as a PDF.

So that’s it for this time on the Daily Dose of Drupal, as always follow me on Twitter and I’ll be back again next time with another episode, thanks for watching.