Search code examples
asp.netvb.netdpl

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. I know have to adapt this to print to a Pacesetter Auto Bagger. It is connected through our network and can ping the printer.

Before learning to program DPL I just want to verify that I am able to communicate with the printer. 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? 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.

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()

Solution

  • 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.

    Besides the creation of the text file I also changed.

    clientSocket.Send(Encoding.UTF8.GetBytes(Label))
    

    To

    clientSocket.SendFile("Insert Filepath Here")