为特定页面设置浏览器打印机 [英] Set browser printer for specific page
问题描述
我正在编写基于网络的软件。我打印条形码。
I'm coding a web based software. I print barcodes.
PC上有2台打印机,因此用户必须选择条形码打印机打印条形码,激光打印机打印报告。
There are 2 printers at the PC, so user always has to select barcode printer for printing barcode and laser printer for printing reports.
有没有办法为页面设置打印机。 (来自浏览器设置或通过javascript)
Is there any way to set a printer for a page. (From browser settings or via javascript)
例如:
www.example.com/barcodeprint.php
---->条码打印机
www.example.com/barcodeprint.php
----> Barcode printer
www.example.com/reportprint.php
---->激光打印机
www.example.com/reportprint.php
----> Laser printer
谢谢
推荐答案
最好的方法是在firefox上使用js print setup扩展。但扩展dos不支持firefox 56.所以你必须下载max firefox 56版本,断开互联网(自动更新到firefox 58),设置firefox,禁用自动更新然后重新连接互联网。通过这种方式,您可以使用特定打印机而无需选择打印机对话框
best way is using js print setup extension on firefox. But the extension dos not support over firefox 56. So you have to donwload max firefox 56 version, disconnect internet (automatically updates to firefox 58), setup firefox, disable auto update then re-connect internet. By this way you can use a specific printer without select printer dialog.
感谢您的回复。
这篇关于为特定页面设置浏览器打印机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!