[whatwg] [html5] onbeforeprint/onafterprint (was window.print() undefined)

On 7/19/05, Dean Edwards <dean at edwards.name> wrote:
> Matthew Raymond wrote:
> > For instance, such events could be combined with AJAX to force people
> > into a pay-to-print scenario.
> 
> What's wrong with paying to print a high quality version of an image? If
> you ask me this is a great example of why we should allow these events.

This is another of the use cases I've used "enhanced" printing for - I
actually generally used ScriptX http://www.meadroid.com/scriptx/
rather than simply the IE methods, but the events are all that's
needed.  Not paying for printing images, but swapping out images with
higher quality images suitable for print.

Someone will probably suggest CSS background-images as a suitable for
this aswell, yet again ignoring the fact that CSS is _optional_, and
content-images must not be in background images as they simply won't
be seen without CSS or if background images are disabled.

I can appreciate the viewpoint that onbeforeprint/onafterprint aren't
archetecturally brilliant, but then most of web-applications spec
isn't brilliant from an architectural perspective - it's shoe-horning
web-application functionality into a document mark-up language,
however I don't see what's especially bad about
onbeforeprint/onafterprint, and they're very commonly used in intranet
applications - if Opera and Mozilla are going to make any headway
there we need the kind of high quality print control that is
obtainable with IE.

Jim.

Received on Tuesday, 19 July 2005 14:01:31 UTC