POS打印串口c# [英] POS printing serial port c#

查看:88
本文介绍了POS打印串口c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用此代码进行打印

i have been trying to print using this code

http://www.dreamincode.net/forums/topic/44330-printing-in-c%23/

这是一个普通页面,但

我想知道我需要使用这个打印收据等格式设置..

i would like to know what format settings would i need to print reciepts etc using this..

任何帮助都将非常感谢  ;

any help would be greatly appreciated 

推荐答案

Hello Bilal,

Hello Bilal,

对于POS打印,它取决于关于如何连接打印机。
并行端口
串口自定义库?尝试访问您的POS打印机供应商的网站,查看是否有任何API代码。 

For POS printing, it depends on how the printer is hooked up. Parallel Port? Serial Port? Custom Library? Try going to your POS printer vendor's website to see if any API code is available. 

此外,您可以尝试检查 .Net POS 1.11库适合您的情况。你可以从这个网站下载它 -

http:// www.microsoft.com/downloads/details.aspx?familyid=8F06B072-06C1-4A4A-A128-83B8A651A25A&displaylang=en
 

Besides, you can try to check if .Net POS 1.11 library is suitable to your case. You can download it from this website - http://www.microsoft.com/downloads/details.aspx?familyid=8F06B072-06C1-4A4A-A128-83B8A651A25A&displaylang=en 

您可以尝试使用 OPOS 与打印机通信。这是一个行业标准,可以在以后阶段更改为打印机而不对代码进行任何更改。尝试从这个
网站下载驱动程序 -
http://www.star-micronics.co.jp/service/ s_print / opos_win32_yyyymmdd.exe.htm

You can try to use OPOS to communicate with the printer. This is a industry standard and makes it possible, at a later stage, to change to make of printer without making any change to the code. Try to download drivers from this website - http://www.star-micronics.co.jp/service/s_print/opos_win32_yyyymmdd.exe.htm

驱动程序会安装您可以使用的com对象。 com对象使用了一些在
中定义的常量 C:\Program Files \ OPOS \Include\OposPtr.h 端口应该是一个简单的任务这些常量为c#。



您必须使用转义码来格式化打印输出。一个很好的参考来自这个网站 -

http://www-900.ibm.com/ cn / support / library / pos / download / ibmoposuserreference170.pdf
 

The driver installs a com object you can use. The com object uses some constants that are defined in
C:\Program Files\OPOS\Include\OposPtr.h It should be an easy task to port these constants to c#.

You must use escape codes to format the printout. A good reference is from this website - http://www-900.ibm.com/cn/support/library/pos/download/ibmoposuserreference170.pdf 

尝试查看有关POS打印机的网站。 NET 了解详情 -

http://www.thescripts.com/forum/thread636335.html
 

Try to check out this website about POS printer in .NET for details - http://www.thescripts.com/forum/thread636335.html 

相关主题:

http://social.msdn.microsoft.com/Forums/en-US/posfordotnet/thread/d1dd6b1b-62c8-4ca8-9822-607e277d01f6

http://social.msdn.microsoft.com/Forums/en/posfordotnet/thread/a0be3f5b-8c6d-4a17-9893 -2f9eb78c2600

此外,我们还有关于 POS的论坛对于.NET ,问题与该论坛更相关,因此我将从Base"Windows Forms"移动此线程。到" POS
for .NET
"论坛,因为这个问题与它有关。该论坛有更多POS专家。

Besides, we have forum about POS for .NET, the question is more related to that forum, so I will move this thread from Base "Windows Forms" to "POS for .NET" forum, since this issue is related to it. There are more POS experts in that forum.

最诚挚的问候,


这篇关于POS打印串口c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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