使用POS for .NET在ThermalReceipt上打印QR码 [英] Print QR Code on ThermalReceipt using POS for .NET

查看:94
本文介绍了使用POS for .NET在ThermalReceipt上打印QR码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在收据上打印二维码,但是它会出错。

打印文本工作正常,但无法打印位图图像或位图内存。







我使用时会抛出错误



1. PrintBitmap







printer.PrintBitmap(PrinterStation.Receipt,filePath,PosPrinter.PrinterBitmapAsIs,PosPrinter.PrinterBitmapCenter); < br $>














方法PrintBitmap引发异常。设备无法执行所请求的程序。







2. PrintMemoryBitmap







System.Drawing。位图bm = QRGen(文字);











printer.PrintMemoryBitmap(PrinterStation.Receipt,bm,PosPrinter.PrinterBitmapAsIs,PosPrinter.PrinterBitmapCenter);







方法PrintMemoryBitmap抛出异常。控件无法与服务对象通信。最有可能的是,必须更正设置或配置错误。

解决方案

进行正常打印,但在此您需要指定材料的长度和宽度。你要打印你的QRCode。这个设置你可以在特定打印机的打印机设置中找到。



祝你好运


< blockquote>你好,



你可以更好地使用给定的PrintBarCode函数吗?



printer.PrintBarCode(PrinterStation .Receipt,Test,BarCodeSymbology.QRCode,100,100,1,BarCodeTextPosition.Above);



亲切的问候,

迈克尔

I want to print QR code on receipt but it gives an error
Printing of text works fine but unable to print the bitmap image or bitmap memory.



It throws an error when i use

1. PrintBitmap



printer.PrintBitmap(PrinterStation.Receipt, filePath, PosPrinter.PrinterBitmapAsIs, PosPrinter.PrinterBitmapCenter);







"Method PrintBitmap threw an exception. The device cannot perform the requested procedure."



2. PrintMemoryBitmap



System.Drawing.Bitmap bm = QRGen(text);





printer.PrintMemoryBitmap(PrinterStation.Receipt, bm, PosPrinter.PrinterBitmapAsIs, PosPrinter.PrinterBitmapCenter);



"Method PrintMemoryBitmap threw an exception. The Control cannot communicate with the Service Object. Most likely, a setup or configuration error must be corrected."

解决方案

Go for normal printing but in this you need to specify the length and width of the material on which you are going to print your QRCode. This setting you will find in the printer setting of that particular printer.

Best of luck


Hello,

May you better use the given PrintBarCode function?

printer.PrintBarCode(PrinterStation.Receipt, "Test", BarCodeSymbology.QRCode, 100, 100, 1, BarCodeTextPosition.Above);

Kind Regards,
Michael


这篇关于使用POS for .NET在ThermalReceipt上打印QR码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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