php or javascript Auto Print

亡梦爱人 提交于 2019-12-31 03:46:06

问题


I want my application to print directly to the default printer without the Windows select printer dialog coming up and I really dont need to display the screen. All the user wants is a printout, receipt.


回答1:


No, you cannot do it. You can only do window.print() with javascript and it displays the window.

Why you cannot: because safety.




回答2:


No I'm afraid this is not possible. You could just run millions of print tasks at the time, and it wouldn't be good for user




回答3:


yes, you can. In Firefox about:config you can make property print.always_print_silent equal to true.Then Firefox will print without prompt. And using "JS Print setup" you can adjust some printer parameters directly from javascript




回答4:


Short answer: you can't do that with JavaScript.



来源:https://stackoverflow.com/questions/7448008/php-or-javascript-auto-print

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