views:

32

answers:

1

Hi everyone, I wanted to ask if there is a way to capture the print events (like IE onbeforeprint and onafterprint events). Actually I would like to do more. I want to know if I could interrupt printing, cancel it or may be change the print option all together to have a myPrint option. Can this be achieved through plug-ins/extensions/XPCOM ? Actually I want a cross-browser control and I dont mind having separate control in different browsers.. Like via a plug-in in IE, extension/XPCOM in mozilla and Chrome extensions if possible..

A: 

I'll quote danieltalsky answer to the Javascript Event Handler for Print post since I think that the same applies in your situation:

In IE there are the nonstandard window.onBeforePrint() and window.onAfterPrint() event listeners. There isn't a non-IE way to do it that I know of, however.

What kinds of changes are you trying to make? It's possible that your problem could be solved by specifying different rules for your print stylesheet.

Arnaud Leymet
Hi Arnaud. As said in the question, I want to do a whole lot of things, not just change the styles using print CSS. Also I am open to having COM components or plug-in.
Sharad