选择打印机并静默打印 [英] Select a printer and silently print

查看:59
本文介绍了选择打印机并静默打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个答案展示了如何在谷歌浏览器中启用静默打印.但是,我有两个网页,必须使用两台不同的打印机静默打印,而无需进一步的用户交互.有没有办法在调用 window.print() 之前自动选择打印机?如果真的有必要,我不介意编写 Chrome 扩展程序.

This answer shows how to enable silent printing in Google Chrome. However, I have two web pages which have to be silently printed using two different printers without further user interaction. Is there a way to select a printer automatically before calling window.print()? I don’t mind writing a Chrome Extension if really necessary.

推荐答案

也许您可以使用 Google Clound Print 设置您的打印机,然后使用 云打印 API 以静默方式向他们提交作业.看起来您可以在提交作业时指定打印机 ID.您可能需要使用诸如 html2canvas 之类的东西来光栅化网页.

Maybe you could setup your printers with Google Clound Print then use the cloud printing API to silently submit jobs to them. It looks like you can specify the printer id when you submit the job. You might need to use something like html2canvas to rasterize the webpage.

这篇关于选择打印机并静默打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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