FireFox print options

不问归期 提交于 2019-12-24 11:35:05

问题


how i can customise firefox print options with javascript, without display the print dialog.

i found this ff extention ( https://addons.mozilla.org/fr/firefox/addon/8966 ) , but he cant set the page format (A4 or A5)

thanks


回答1:


Looking at the source code for that extension, it looks like it does support setting paperHeight and paperWidth, so you could indeed set the page format to A4 or A5.

However, is your goal to control the printer settings for your own personal browser? Or are you hoping to customize options for your visitors?

If your goal is to bypass the print dialog when someone visiting your site tries to print, that's not possible in any major browser. Browsers leave control over print preferences entirely with the user, and websites cannot change that through JavaScript or any other means.

If you just want a way to control your own personal browser, that extension does look like the right way to go.



来源:https://stackoverflow.com/questions/1282178/firefox-print-options

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