发送命令到热敏打印机 [英] Send command to thermal printer

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

问题描述

大家好
我在热敏打印机(Bixolon Srp 350 plus)中打印波斯字符时遇到问题.该公司在c#中提供了一个类,用于将字符串发送到打印机进行打印,但是当我发送波斯字符时,它将打印``?''而不是波斯他们告诉我应该将代码页更改为波斯字体,但是我不知道如何在c#中做到这一点.将十六进制值更改为波斯语的命令类似于波斯语(1b 74 1b).还有别的:当我使用写字板打印时,它可以正常打印.请帮帮我.
非常感谢.

Hi everyone
I have a problem in printing farsi character in thermal printer(Bixolon Srp 350 plus).The company provide a class in c# to send string to the printer to print , but when I send farsi character it prints ''?'' instead of farsi character.They told me that I should change code page to farsi font , But I dont know how can I do that in c# . The Command to change code page to farsi is something like this ( 1b 74 1b ) in Hex value . There is something else : When I print by using Wordpad it prints fine . Please help me.
Thanks a lot.

推荐答案

您以图形方式打印写字板文档.很好.

您如何知道打印机在字符模式下支持Unicode(.NET使用它)?我怀疑不是这样:代码页的整个概念都来自Unicode之前的时代.但是,为了与过时的编码和代码页兼容,Windows代码页1200归属于Unicode. (您尝试吗?)

您确实需要在图形模式下进行打印.在Unicode和.NET中使用波斯语从来都不是问题.更确切地说,如果您正在谈论现代波斯语,它是一种波斯语-阿拉伯语脚本,请参见 http://en .wikipedia.org/wiki/Perso-Arabic_script [ ^ ].

使用类System.Drawing.Printing.PrintDocument.有关代码示例,请参见 http://msdn .microsoft.com/en-us/library/system.drawing.printing.printdocument(v = VS.100).aspx [
You print your Wordpad documents in graphic mode. This is good.

How do you know your printer supports Unicode (which is used by .NET) in character mode? I suspect it does not: the whole notion of code page is from the pre-Unicode epoch. However, for compatibility with obsolete encoding and code pages, the Windows code page 1200 is attributed to Unicode. (Do you try it?)

You really need to print in graphics mode. Using Farsi with Unicode and .NET is never a problem. More exactly, if you''re talking about modern Farsi, it''s a Perso-Arabic script, see http://en.wikipedia.org/wiki/Perso-Arabic_script[^].

Use the class System.Drawing.Printing.PrintDocument. For the code sample, see http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument(v=VS.100).aspx[^].

—SA


您好,当我在报告查看器中使用热敏打印机打印时,不会在第一页和第二页之间切换,请帮助我
hello ,when i print with thermal printer in report viewr ,does not cut between first page and second page ,please help me


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

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