You are here: TWiki> Codev Web>TopicPrinting (2004-05-23, MattWilkie)
Tags:
create new tag
, view all tags
To call up the Print dialogue box directly (bypass File > Print menu) embed javascript:print() in a topic; perhaps in the 'print' skin, to make it easy for users to print the topic with a single click.
<a href="javascript:print()">print this page</a>
produces: print this page

Known to work for (if it works for other browsers too, please add them to the list):

Another method is to reference a stylesheet which is only used for printing. A CSS aware browser automatically uses the print stylesheet when the user prints the page using the standard mechanism (file > Print)-- which means a trip to the special print skin is no longer needed.

    <link rel="stylesheet" type="text/css" media="print" href="/print.css" />


RichardDonkin, MattWilkie,
Topic revision: r6 - 2004-05-23 - 04:05:15 - MattWilkie
 

Codev

share: Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon
Twiki, Inc.
This site is powered by the TWiki collaboration platform
Ideas, requests, problems regarding TWiki? Send feedback
Copyright © 1999-2010 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.