开发者

Capturing Print Events via Jquery/JS/Browser Specific APIs

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..


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜