动态更改打印数据 [英] Dynamically change print data

查看:222
本文介绍了动态更改打印数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一种处理发送到打印机(目前为喷墨打印机,可能是HP 2460)的数据的方法。
我想在打印机每次尝试打印时动态更改数据。

I am looking into a way to manipulate the data sent to a printer (inkjet for now. Probably an HP 2460). I want to change the data dynamically each time the printer tries to print.

即。在第1点,打印的页面将正常保存,但是纸张可能会改变其位置,因此我正在寻找一种方法来旋转输入图像以抵消纸张的旋转。

Ie. at point 1, the print will be of the page kept normally, but the paper might change its position, so I am looking for a way to rotate the input image to counter the rotation of the paper.

I 思考 我正在寻找一种方法来实时指定要逐个像素打印的数据。

I think I am looking for a way to specify the data to be printed pixel by pixel in real time.


  1. 旋转

  2. 打印头相对于页面角的位置,实时提供每个瞬间



到目前为止,我得到的是:



我见过一个实例,其中某台HP喷墨打印机被修改为可以直接在arduino上工作,但我想直接从计算机上完成现在有两个原因:

What I have so far:

I have seen one instance where a particular HP inkjet was modified to work directly off an arduino but I would like to do it directly from the computer for now for 2 reasons:


  1. 我需要尽快提交概念证明系统

  2. 我不太容易访问逻辑分析仪/范围来逆转
    工程师的通信协议(也可能不是专业知识)。

我正在研究 PostScript GhostScript ,但是到目前为止,我仍然无法理解动态修改数据(仍要尝试弄清楚,如果我错了,请原谅我)。这种方法行得通吗?还是我需要研究驾驶员或其他问题?

I am looking into PostScript, GhostScript but from what I understand so far, I wont be able to modify the data dynamically (Still trying to figure it out, so pardon me if I'm wrong). Would this approach work? Or do I need to look into drivers or something else?

我知道问问题的限制以及对研究不足的问题的皱眉。我仍在努力寻找完成的方法,并一直在研究我脑海中出现的所有事物,并且在浏览过程中遇到了很多问题。但是,到目前为止,我所看到的一切似乎都无法做到我想要的(或者我很想念)。我问这个问题是为了希望获得一些关于要研究的内容的指示。

I am aware of the restrictions of asking questions and how ill-researched questions are frowned upon. I am still trying to figure out how to get this done and have been looking into all the things that came up in my mind and I am coming across while looking through. But, so far, whatever I've seen doesn't seem to be capable of doing what I want (or I'm missing it). I'm asking this question in the hope of getting some pointers as to what to look into.

推荐答案

一个问题是打印机制造商已停止分发有关打印机命令语言的文档。

One problem is that most printer manufacturers have stopped distributing documentation on the printer command language.

另一个问题是,像点矩阵打印机一样,ghostscript输出设备已经过时了。 (请参阅问题一)。

Another problems is ghostscript output devices are hopelessly out of date, like dot matrix printers. (see problem one).

对于丝网印刷输出应用程序,我对epson 1400打印命令语言进行了反向工程,并编写了将位图输出到打印机的程序。然后我写了一个基于.bmp驱动程序的ghostscript打印驱动程序,该驱动程序创建了位图并将位图转换为epson命令。既然您要使用HP​​,那么不幸的是该代码将无济于事。

For a screen printing output application, I reverse engineered the epson 1400 print command language and wrote a program to output a bitmap to the printer. Then I wrote a ghostscript printdriver based on a .bmp driver which created bitmaps and converted the bitmap to epson commands. Since you want to use an HP, this code unfortunately won't help.

走了那条路,我可以告诉您这并不容易。喷墨不允许旋转,因此您需要对喷墨进行光栅化,然后重新创建旋转的图像。使用gsprint和redmon运行到打印机时,Ghostscript本身很棘手,但是如果您已经有可以垂直打印的Postscript作业,则可以使用postscript命令旋转和移动图像。

Having gone down that road, I can tell you it isn't easy. Inkjet's don't allow rotation, so you'd need to rasterize the inkjet, then re-create a rotated image. Ghostscript is itself tricky to get running to a printer using gsprint and redmon, but if you already have postscript job that prints upright, then the image can be rotated and shifted with postscript commands.

我不明白您要达到的目标。您是否可以使用带有网络摄像头的PC预览方向,然后生成位图并将其打印到打印机,还是需要等到纸张就位后才能生成打印数据?

I don't understand what you are trying to accomplish. Can you use a pc with a webcam to preview the orientation, then generate a bitmap and print it to the printer or do you need to wait till the paper is in position before generating the print data?

这篇关于动态更改打印数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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