r6 - 23 May 2004 - 04:05:15 - MattWilkieYou are here: TWiki >  Codev Web > TopicPrinting
Tags:
, create new tag
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,
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r6 < r5 < r4 < r3 < r2 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo