Supplementary properties/settings for JavaScript:window.print() to enable Backgrounds by default

烂漫一生 提交于 2019-12-13 14:16:20

问题


I would like tot give my Print this Page button a special magical property sothat it automatically enabled the by default unset property (see picture) namely to Do Print the Backgrounds of div colors and bg images etc.

<a href="#" onclick="javascript:window.print()"><? echo __('Print'); ?></a>

Clues, ideas, code, answers or suggestions as answers are all tremmendously welcome and I a will appreciate any hints at all for this dream to come true. Thanks in advance.


回答1:


This cannot be done, unfortunately. This is disabled across all browsers by default (unless a user changes it in their settings).




回答2:


This is not possible . You cannot change the browser settings , if that would be possible people could hack in very easily



来源:https://stackoverflow.com/questions/5373535/supplementary-properties-settings-for-javascriptwindow-print-to-enable-backgr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!