简体   繁体   English

使用 DPL 通过以太网打印到 Pacesetter PS125,我可能需要哪些自定义配置 - 无法通信

[英]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.

相关问题 我可能正在使用ASP.NET应用程序。 Java / PHP开发人员在开始之前需要了解什么? - I might be working on an ASP.NET application. What does a Java/PHP developer need to know before starting? 我需要Antixss进行报告打印吗 - would i need antixss for report printing 为什么找不到需要引用的企业程序集? - Why can't I find the Enterprise assemblies that I need to reference? 使用带参数的动态SQL是否安全? 如果没有,它可能会遇到哪些安全问题? - is it safe using dynamic SQL with parameters? If not, what security issues might it be exposed to? 自定义集合和枚举数有什么需求? - What is the need for custom collections and enumerables? 为什么不能在ASP.NET中使用JavaScript创建自定义验证器? - Why can’t I create a custom validator using JavaScript in ASP.NET? Docker 容器(MariaDb、AspNet)无法在 Compose 网络上通信 - Docker Containers (MariaDb, AspNet) Can't Communicate on Compose Network 对于Transfer类,我需要什么using语句? - What using statement do I need for the Transfer class? 我需要在“使用”中添加什么才能让我的代码运行? - What do I need to add with “using” to get my code to run? 当服务器端引发事件时,我需要在2个页面之间进行通信,而无需使用ajax刷新页面 - I need to communicate between 2 pages without refreshing the page, with ajax, when a event is raised on the serverside
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM