如何绕过使用javascript或JQuery ..的打印对话框? [英] how to bypass print dialog box using javascript or JQuery..?

查看:182
本文介绍了如何绕过使用javascript或JQuery ..的打印对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常window.print()用于打印网页,它会触发浏览器的打印对话框.

Normally window.print() is used printing webpage, it trigger print dialog box of browser.

现在我的问题是我们如何才能绕过该打印对话框并直接打印网页?有什么办法可以避免单击确定"按钮?

Now my question is how can we bypass this printing dialog box and directly print the web page? is there any way by I could avoid to click on OK button?

推荐答案

如今,我相信您可以通过使用一些云打印REST API来避免任何应用程序出现打印对话框.到目前为止,我只知道PrintNode和Google Cloud Print:

Nowdays I believe you could avoid the print dialog from any application by using some cloud printing REST API. So far I only know of PrintNode and Google Cloud Print:

  • https://www.printnode.com/docs/api/curl/
  • https://developers.google.com/cloud-print/docs/appInterfaces

希望这会有所帮助.

这篇关于如何绕过使用javascript或JQuery ..的打印对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆