如何使用c#向Bixolon热敏打印机发送命令(How to Send commands to Bixolon thermal printer using c#)

   IT问题网   2021-02-22 00:00:00

问 题

首先,我在google上进行了搜索,但是没有使用c#的示例代码可以发送打印机命令。



我正在尝试发送命令打印机,如

 esc c 3 
到bixolon热敏打印机。如果纸张中的纸卷即将结束,该命令将发出纸张结束信号。我为其他命令找到了一些vb6代码,但它不适用于c#。我甚至在项目中添加了一个microsoft.visualbbasic.powerpacks.vs.dll来向打印机发送

命令

  using  microsoft.visualbasic.powerpacks.printing.compatibility.vb6; 

打印机打印机= printer();
printer.print(" \ x1b \ x63 \ x33");
printer.write(" \ x1b \ x63 \ x33");

printer.enddoc();




可以找到bixolon命令手册其中 [ ^ ]

示例代码非常有用。先谢谢你...

解决方案

使用以下示例:

 serialport comport =  new  serialport("  com1" 2400 );  //  将参数更改为您的打印机规格。 
comport.open();
comport.write(" \ x1b \ x63 \ x33"); // 在此处写入您的打印机
comport.close();




您可能想要从上面的代码创建一个处理打印机的类来发送多个命令等。

嗨,praveen kullu



尝试以下内容可能对您有所帮助。

- gt;将您的数据写入您想要的文本文件

ie \ x1b \ x63 \ x33等...

- gt;创建一个批处理文件 http://www.robvanderwoude.com/printfiles.php[ ^ ]



- gt;运行批处理文件 http://stackoverflow.com / questions / 394036 / how-to-execute-a-bat-file-from-ac-windows-form-app[ ^ ]

http://forums.asp.net/t/1444055.aspx/1[ ^ ]

标签:如何使用热敏打印机发送命令



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

图像波动问题(image fluctuation problem)

problem i want to know how to remove image fluctuate from ...

LISTVIEW每行的随机ID(LISTVIEW random id for each row)

problem hi, all i want is to generate an id ...

如何创建自定义Web控件......?(How to create a custome web control...)

problem 1) i want to create a class that will inherited f ...

如何管理该代码(how to manage that code)

problem my question is......... we have 3 buttns on page ...

如何删除sysobjects中的列数据但不删除它们的关系(how to delete columns data in sysobjects but not deleted their relations)

problem hello how to delete all system table columns dat ...

异步wcf调用和mantaining会话?(asynchronous wcf call and mantaining session )

problem i have two pages on my website .from page 1 i am ...

通过网络传递序列化数据(Passing serialized data over network)

problem hey, i have a problem with deserializing an objec ...

程序显示按完成时间排序的跑步者,其中一列显示其年龄组内的完成位置(排名)。(Program to display the runners sorted by finish time with a column showing their finish position (ranking) within their age group.)

problem you have a list of runners and their race times a ...

如何调试我的xpath并检查它是否存在一些问题?(How to debug my xpath and to check if there are some problems in it )

problem hi,everyone! now i have a xml file and it looked ...

用户界面设计(User interface Design)

problem hi, i want to design all the user interface scree ...

在ASP.Net中拖放图像(Drag and drop image in ASP.Net)

problem hi, i saw "the drag and drop image i ...

任何人都可以帮助解决'/'应用程序中的服务器错误。(Can any one help dis error Server Error in '/' Application.)

problem hi every one i am upload one .aspx p ...

灰度图像处理(Gray Scale image Processing)

problem hi i want cut the image from pattern the output o ...

如何从javascript调用jsp页面(How to invoke jsp page from javascript)

problem how to invoke jsp page from javascript solution h ...

如何为字符串附加字符。(How can I append characters for a string .)

problem hello all, i have to append lt;stxgt ...

C#Yahoo Messenger注册表观察者(C# Yahoo Messenger registry watcher)

problem hi, my name is nicusor, i have found this code on ...

想要开始编码DMP打印机(Want to start Coding For DMP Printers)

problem hii.......... friends i want to sta ...

如何获取放置在gridview行中的服务器控件的客户端ID(How to get Client id of server control placed in gridview row)

problem hi i am creating row in gridview dynamicaly, hav ...

制作“制作文件”时出错UNIX(Error while making "Make File" unix)

problem i have 7 files which are as follows:; -hw1.cpp -m ...

邀请Facebook好友加入asp.net(Invite Facebook friends in asp.net)

problem hello all, how can i invite facebook friends usin ...