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 of our content. Then we get another NPP_SetWindow() that restores us to the Safari window size.
NPP_Print() is never called.
We are using the Cocoa Event model and the Core Animation drawing model.
What do you expect to be passed as printInfo->print.embedPrint.platformPrint?
(In reply to comment #1)
> What do you expect to be passed as printInfo->print.embedPrint.platformPrint?
I think it would depend on the negotiated drawing model.
If we've negotiated a CoreAnimation layer, I would expect a CALayer. I can put whatever I want on that layer and return. I would not expect it to be the same layer I provided to the browser, since that is being used to display on the window. The browser would own the printed layer.
I'm not familiar enough with the other drawing models to know, but I expect it would be similar.