PHP 热敏打印客户端 [英] PHP Thermal Printing Client-Side

查看:42
本文介绍了PHP 热敏打印客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台爱普生热敏打印机,型号为 TM-T20,我正在为客户设置.

I've got a Epson Thermal printer, model TM-T20 which I'm setting up for clients.

我们的网络服务器是一个 linux 服务器,而客户端机器将是 Windows 机器.

Our webserver is a linux server, and the client machines will be Windows machines.

可以用php直接控制客户端电脑上的热敏打印机吗?

Is it possible with php, to directly control the thermal printer attached to the clients computer?

我看过 javascripts window.print(),但这不是我想要的,如果可能的话我想绕过打印对话框.

I have looked at javascripts window.print(), but that is not what I want, if possible I want to bypass the print dialog.

谢谢,托尼

推荐答案

没有.PHP 与客户端的打印机完全没有任何关系.如果打印机连接到运行 PHP 脚本的机器(即服务器),您可能会做一些事情.事实上,PHP 只向客户端发送文本.从那里,客户端的浏览器和打印机软件必须处理它.

No. PHP has absolutely nothing to do at all with the client's printer. If the printer was attached to the machine the PHP script is running on (i.e. the server), there may be something you could do. As it is, PHP only sends text to the client. From there, the client's browser and printer software has to handle it.

或者,如果 Windows 机器运行打印服务器,暴露 PHP 可以通过网络与之通信的打印机,则您可以直接与打印机通信.但这将不再是正常的 PHP 服务器/客户端关系.

Alternatively, if the Windows box ran a print server exposing the printer that PHP could talk to over the network, you could talk to the printer directly. But that wouldn't be a normal PHP server/client relationship anymore.

这篇关于PHP 热敏打印客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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