Printing of web pages currently bypasses plugins. NPAPI-based pluging should implement the NPP_Print function and render to the passed context directly. Apparently, many plugins do not implement NPAPI which has led to various attempts to support printing by taking screen shots of the region for print purposes and ultimately this feature was left unimplemented. As an initial step, I think the NPAPI NPP_Print functionality should be expected of plugins that intend to display printed output. If the function is implemented WebKit should take advantage of it. If not, the plugin should not be printed. Future refinements of this work could provide some kind of screen-grab fallback for non-compliant plugins.
[Will be adding another bug in the correct component but adding this here in case it's the right spot] I am seeing no calls to NPP_Print when printing. I am using the WebKit nightly from about a month ago, but we are also seeing this in Safari 5.1.2, both on 10.6 and 10.7. When the user is in a document controlled by a plug-in and chooses "Print", the plugin gets the call NPP_SetWindow() with page-size window... that causes us to resize our view to be page ratio, which is surprising our users. The Print sheet appears, then printing doesn't print anything. Then we get another NPP_SetWindow() that restores us to the Safari window size. NPP_Print() is never called.
(In reply to comment #1) > [Will be adding another bug in the correct component but adding this here in case it's the right spot] Bug 77902, and I'm not sure how that is different from this one.
We're never going to support printing with NPAPI
(In reply to Brady Eidson from comment #3) > We're never going to support printing with NPAPI I'll try to break the bad news to that guy.