admin管理员组文章数量:1356429
I have created an iframe for printing but in chrome it shows print preview and in other browsers it does not show any print preview dialog. So please suggest to me how to disable print preview in chrome.
I have searched this a lot on google but did not find any fix.
I have created an iframe for printing but in chrome it shows print preview and in other browsers it does not show any print preview dialog. So please suggest to me how to disable print preview in chrome.
I have searched this a lot on google but did not find any fix.
Share Improve this question edited Aug 20, 2015 at 11:16 Pete 58.5k29 gold badges130 silver badges184 bronze badges asked Aug 18, 2015 at 7:48 user2078643user2078643 952 gold badges2 silver badges12 bronze badges 4-
Your question isn't very clear
in chrome it shows print preview
could you clarify? – NibblyPig Commented Aug 18, 2015 at 7:49 - I want to disable it.. I don't want any print preview. OR Please suggest me the way to detect whether print preview is enable or not in Chrome – user2078643 Commented Aug 18, 2015 at 8:08
- 1 This is browser behaviour which you can't control. The only thing you can control is how your content looks if the user does choose to print using a print stylesheet. – timothyclifford Commented Aug 18, 2015 at 10:54
- Possible duplicate of Disable print preview in Chrome – CubeJockey Commented Oct 5, 2015 at 17:14
1 Answer
Reset to default 6I assume you're using Windows. In older versions of Chrome (version 20 & below):
- In your browser, navigate to chrome://flags/#print-preview
- Click disable to prevent the preview window from appearing.
In newer versions of Chrome (currently on version 47), the above option has been removed, so you must do it through the mand line:
- Find the shortcut (the Google Chrome icon) you use to open Google Chrome, right click that and select properties - Note you may need to go to Start Menu -> All apps (windows 8-10) -> Programs -> Quick Launch
- Add a space, followed by "--disable-print-preview" (without the quotation marks) to the very end of the "Target" textbox, don't remove any of the text that's already there.
Not the most pleasant solutions, but it does work. Hopefully Google will put that option back into the app, as there is cases where it's not practical for it to appear.
If you want to skip both the chrome print preview and windows print preview steps, use the mand line "--kiosk-printing". This will quick print, so to speak, to the puters default printer and default settings.
Chrome like to hang around with background tasks so for either of the above options, make sure you relaunch Chrome and restart the machine if necessary.
本文标签: How To disable Print Preview feature of Chrome browser using Javascript or cStack Overflow
版权声明:本文标题:How To disable Print Preview feature of Chrome browser using Javascript or c# - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744031936a2579069.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论