W3C home > Mailing lists > Public > public-webapi@w3.org > July 2006

Re: printing events and web applications

From: Dave Raggett <dsr@w3.org>
Date: Mon, 17 Jul 2006 16:25:49 +0100 (BST)
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Cc: public-webapi@w3.org
Message-ID: <Pine.LNX.4.62.0607171549060.8903@localhost.localdomain>

Hash: SHA1

On Mon, 17 Jul 2006, Lachlan Hunt wrote:

> Dave Raggett wrote:
>> Internet Explorer provides two events that are very useful
>> for web applications involving dynamic html when it comes to
>> printing. These are onbeforeprint and onafterprint.
>> As an example, consider HTML Slidy
>>     http://www.w3.org/Talks/Tools/Slidy
>> Slidy uses CSS for layout and a linked script to present div 
>> elements as slides, one slide at time. The other slides are 
>> hidden by setting the div element's display property to none and 
>> visibility to hidden.
>> This looks great for presentation purposes, but if the user tries
>> to print the page then the browser will only print the currently
>> visible slide. Most of the time, that isn't what people expect.
>> Instead they want to have all of the slides printed.
> This use case is more easily handled using a print stylesheet.

Slidy does indeed include a style sheet for print media but that 
isn't sufficient. Currently I make slides visible/invisible by
setting the display and visibility properties from slidy.js, and
likewise for incrementally revealed items on each slide. Properties
set via the CSS DOM take precedence of style rules and hence even
with @media print style rules, the printer will only show the
current slide and what is currently revealed on that slide.

In general, web applications aren't like static web pages, and
a print out from the application will require more that just the
use of @media print and a few style rules. The print out isn't
just a a rearrangement of what is on the screen. For example, you 
might make use of Ajax to pull data from the web site to provide
the user with information designed for offline use, rather thsn
the slice presented interactively with the online application.

  Dave Raggett <dsr@w3.org>  W3C lead for multimodal interaction
  http://www.w3.org/People/Raggett +44 1225 866240 (or 867351)

Version: GnuPG v1.4.1 (GNU/Linux)

Received on Monday, 17 July 2006 15:26:07 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:21 UTC