我想在爱普生POS打印机上打印位图形式的收据。不过,打印机不是直接连接的。回执渲染是在后端sent服务上完成的,生成的字节将发送到前端,即实际连接打印机的前端。
所以我研究了一下Epson JavaPOS ADK,但我发现只有调用直接连接的打印机的代码,但没有实用程序类之类的东西。
所以我的问题是:有没有人知道用Epson JavaPOS ADK“打印”到字节而不是打印机的方法?
谢谢!
发布于 2018-08-11 01:31:01
下面的方法是可以想象的。
将
- Store the Bitmap data notified from the Web service as a BMP file in the frontend file system (not the session local storage of the browser).
- Print the BMP file using the `printBitmap` method of the POSPrinter device.
- Delete the BMP file when printing is completed normally.
- Convert the Bitmap data notified from the Web service into the BMP file image on the memory.
- Print the BMP file image using the `printMemoryBitmap` method of the POSPrinter device.
- When the printing is completed normally, release the memory of the BMP file image.
- Handle printers as Windows standard printers rather than handling them in JavaPOS.
- Switch the printer mode setting and device driver to those of Windows standard printer.
- Convert Bitmap data like page printing using the Windows standard printing API and print it.
当然,将Web服务通知的位图数据转换为BMP文件或Windows打印数据是必要的,但可以通过使用操作系统的API或Java库函数来完成。
基于注释添加的Postscript。
在这种情况下,您可能正在使用ePOS开发工具包而不是JavaPOS开发工具包。
然而,至少有一些软件开发是必要的。
下面有四种类型,请根据您的前端环境进行尝试。
https://stackoverflow.com/questions/51788103
复制相似问题