简体   繁体   中英

WebView cocoa - Printing without a popup

I'm developing an OSX application that displays a web view as a part of the application. Inside the web view, there's a button that lets the users print out the page that they're currently on. When the html is opened in safari and the button is clicked, there's a popup asking the user to select the print settings for that file. However, this popup isn't showing at all when the page is opened in the web view. Is there some way (tweak to the javascript maybe?) that lets me print to the default printer with the default settings without showing this popup at all?

Thanks,
Teja

The print dialog and handling are implemented in the hosting application.
See -webView:printFrameView: in the informal WebUIDelegate protocol for details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM