Knowing when people print using the browser

Hi everyone.

I'm wondering if there is a way that I can track the pages printed via the browser (File -> Print).

I know of several ways to track pages printed otherwise, either via a

print stylesheet, or via javascript or php that would be invoked

through a physical "print page" button in the markup. It's pages

printed through the browser that I'd like to track.

Essentially I'd like to be able to track the performance of individual pages printed, in a dynamic setting.

Any ideas on this one?

Thanks...

[1427 byte] By [Cascadian] at [2007-12-25]
# 1
In the Internet Explorer DOM, you can detect whether or not someone has printed (or used the 'print preview' function) by attaching print events to the window object.

The print events do not belong to any standards and will only work in Internet Explorer.

Example:
<HTML>
<HEAD>
<SCRIPT language="javascript">
window.onbeforeprint = about_to_print;
window.onafterprint = someone_printed;

function about_to_print() {
alert("You're about to use a print function!");
}

function someone_printed() {
alert("You just used a print function!");
}
</SCRIPT>
</HEAD>
<BODY>
TRY PRINTING THIS PAGE!
</BODY>
</HTML>

Wagepeace007 at 2007-8-31 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...