PHP使用点阵打印机进行打印
我正在开发一个最终将打印收据的项目,我的客户使用点阵打印机(一些旧版本)。他将需要一个收据打印速度快(即省时)的系统,而不是打开对话框并选择打印机......此外,打印机将通过网络共享。
主要问题是所有这些都应该使用 PHP 来完成。以下是一些解决方案的想法。
- 设计一个 php 脚本将数据写入文本文件,然后使用远程打印机打印文本文件
- 问题是我很难从 PHP 获取服务器端打印。从逻辑上来说,这似乎是可行的。
平台=====> WIN XP
打印机位置 =====> LAN N/W 上的主服务器
I am working on a project that will end up printing receipts, my client uses a dot-matrix printer (some old version). He will need a system where receipt printing will be fast i.e. time efficient, and not opening a dialog box and choosing a printer...moreover the printer will be shared through a network.
The main problem is that all this should be done using PHP. the following are some thoughts of solutions.
- Design a php script to write data to a text file then print the text file using a remote printer
-the problem is that I am having a hard time getting server side printing from PHP. Logically it seems to work.
Platform =====> WIN XP
Printer Location =====> Main server on a LAN N/W
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
用户点击输入之前的预期工作流程是什么?
打印机的品牌和型号是什么?这很重要,以便我们可以了解它是否需要发送任何奇特的转义码?
通常,如果您要打印,那么它将从客户端计算机发送。
如果从服务器打印,则数据需要发送到服务器或需要已经存在并可访问。它已经存在于数据库中了吗?或者您正在发送网络表单?
你说RCPT,这是收据吗?
What's the intended workflow before the user hit's enter?
What's the make and model of printer? This is important so that we can see if it needs any fancy escape codes sent to it?
Usually if you're printing then it would be sent from the client machine.
If printing from the server the data needs to be either sent to the server or needs to already be there and accessible. Is it already there in a database? Or are you sending a webform?
You say RCPT, is this a receipt?
好的,如果您在服务器上创建了文本文件,您应该能够将文本文件复制到 lpt1: 或 2: 或它定义的任何设备。
您需要知道该文件的名称,或者您可以将其传递出去,但是怎么样:
Okay, so if you have the text file created on the server you should be able to copy the text file to lpt1: or 2: or whatever device it's defined as.
You need to know what the file's named as, or you could pass it on, but how about: