简体   繁体   English

如何在没有用户交互的情况下向打印机发出命令(无打印对话框)

[英]how to give command to printer without user interaction (without print dialog)

我正在用PHP创建一个应用程序,想给打印机一个命令,但是问题是有两个以上的打印机,我想通过单击没有打印对话框的不同按钮来给另一个打印机提供命令。

you can use: 您可以使用:

printer_list()

function to get list of printers attached to server, and then use: 函数获取连接到服务器的打印机列表,然后使用:

printer_open

to open connection to printer providing printer name as parameter to the function. 打开与打印机的连接,提供打印机名称作为功能的参数。 I hope that helps you to some extent 希望对您有所帮助

In online web applications you can't. 在在线Web应用程序中,您不能这样做。

A workaround could be to write Java Applet or in IE you can do this via ActiveX controls. 一种解决方法是编写Java Applet或在IE通过ActiveX控件进行操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM