[英]Printing by Ethernet to Pacesetter PS125 using DPL, what custom configurations might I need - can't communicate
OK, I have a large asp.net application that prints to Intermec and Zebra printers.好的,我有一个大型 asp.net 应用程序,可以打印到 Intermec 和 Zebra 打印机。 I know have to adapt this to print to a Pacesetter Auto Bagger.
我知道必须调整它以打印到 Pacesetter Auto Bagger。 It is connected through our network and can ping the printer.
它通过我们的网络连接,可以ping打印机。
Before learning to program DPL I just want to verify that I am able to communicate with the printer.在学习编程 DPL 之前,我只想验证我是否能够与打印机通信。 I am using the below code to send a "feed form" command but the printer does nothing.
我正在使用下面的代码发送“提要表单”命令,但打印机什么也不做。 I have tried numerous other simple functions as well.
我也尝试了许多其他简单的功能。
Does anyone recall any custom configuration (besides static IP) that they may have had to do to print in this fashion?有没有人记得他们可能必须以这种方式打印的任何自定义配置(除了 static IP)? At this point I have to think this is a printer issue and not my code, as I use it to print to many other devises.
在这一点上,我不得不认为这是打印机问题而不是我的代码,因为我用它来打印到许多其他设备。
I can find very little support/information online for DPL or this bagger so any help would be great.我可以在网上找到非常少的 DPL 或这个 bagger 的支持/信息,所以任何帮助都会很棒。
Dim IP As String = "XXX.XX.XXX.XXX"
Dim clientSocket As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
clientSocket.Connect(New IPEndPoint(IPAddress.Parse(IP), 9100))
Dim Label As String = "<STX>F"
clientSocket.Send(Encoding.UTF8.GetBytes(Label))
clientSocket.Close()
I was able to solve this, not the way I wanted but it works.我能够解决这个问题,不是我想要的方式,但它有效。 Instead of sending the raw DPL to the printer I am creating text file and sending that.
我没有将原始 DPL 发送到打印机,而是创建文本文件并发送它。
Besides the creation of the text file I also changed.除了创建文本文件之外,我还进行了更改。
clientSocket.Send(Encoding.UTF8.GetBytes(Label))
To至
clientSocket.SendFile("Insert Filepath Here")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.