I have not found any clue in Drupal.org on implementing some kind of 'printer friendly page' link...

I _desperately_ need something like that in my site not being able to implement it by myself.

Any tip appreciated.

Comments

javanaut’s picture

It doesn't appear to have been updated for Drupal 4.5 yet, but there is a module that does this:

http://drupal.org/node/8240

Perhaps you can convince the maintainer to update it?

dundun’s picture

Anyway I've just found a way to do it: making a book. It's just enough for me right now but I'd prefer to have that link in normal pages so I'll try to do my best with that module.

Thanks for your help. One of the best things about Drupal is that you always can find a helping hand.

heather’s picture

it's good you found a work around, but if you have the interest there is another solution, printer-friendly CSS.

here is information on how to do it:
http://www.alistapart.com/stories/goingtoprint/

by using CSS (cascading style sheets) you can control and customize the way your HTML appears both on screen and in print (as well as projection and audio readers, etc).

the concept is you create one CSS that controls the appearance for the screen. a second CSS file is read only by printers, and it would have CSS rules to override the main style sheet,making the page look good in the printer. For example, by using point size instead of pixel size; or by making menus disappear, etc.

you would need to do two things:
1) edit your template (to include a link to the printer CSS)
2) create a printer CSS file

your site visitor only needs to do one thing:
1) click print (they don't have to go to another page)

----------------------
the illusion of progress
http://nearlythere.com/

dundun’s picture

I'll have to take a look to your suggestion.

I've just tested the print page module and it works with Drupal 4.5 too, but you get a printed copy just like the browser would print it so there's no any ink-saving as intended. Probably I'd have to modify the call to print.css or something like that.

And the other way to get the thing done (trough book module) is less practical because the module looks inmature and confusing and anyway you only can print some kind of content, if I'm not wrong.

dundun’s picture

No problem on creating print.css (in fact Drupal comes with one and print page module with another one) but I can't make appear the link to print.css at the head section of files. I've tried with index.php and common.inc with no luck.

What do you mean when saying "edit your template"? I've found a couple of files called xtemplate but I can't imagine how to put the link to print.css inside them.

javanaut’s picture

Look in themes/*/xtemplate.xtmpl

You can edit it the themes directly by editing those files, or you can place the link in the primary or secondary links:

administer -- themes -- configure tab - set primary and secondary links html

alexis’s picture

I agree with Heather, using CSS you have much more control and you don't need to make any additional processing at the server. I always use CSS to make printer friendly pages and it works great and just use one javascript call to print.

If you have Acrobat or any other software to create PDF's you can try printing your tests to it, so you don't waste your printer's toner/ink and paper.

Regards!

Alexis Bellido - Ventanazul web solutions

matt westgate’s picture

There is also a printer friendly page module for 4.5. I didn't see that 4.4 print module, otherwise I would have just upgraded that one.

dundun’s picture

Mathias,

That's exactly what I needed! It's already working perfectly in my site.

Thanks to you and everybody over here.

matt westgate’s picture

I re-worked the module a little. You may be interested in the new version. I created a print.tpl.php template file to give site admins control of what node parts this module renders and how the pages are structured. This feature, combined with the custom print stylesheet option, gives max freedom in rendering print friendly pages.

dundun’s picture

I've already updated and now it's even better!

Thanks a lot!