3
I am developing an enterprise inventory management system and the customer needs the system to print the labels on a special label printer (Datamax I-4210) the registered products.
The system is web and is on a server in the company itself and is networked with the printer.
Yesterday I spent all day researching solutions but did not succeed. I actually know that it is possible to send commands to printers by socket, only that it is my first experience with such functionality and I really am well lost. I have no problem sending the sockets and even sending commands, the problem is to be able to connect the printer to send the commands.
The problem itself is to find the IP and the printer port for me to send the sockets with the commands. In the company my client already uses a desktop program called Barone and he can print the labels. Probably because it is a desktop software it can network manipulate the printer and get the data it needs to somehow send the commands. The same cannot be used by me since the system is in PHP and I can’t get this data from the printer.
But if you can send sockets you must be connected. It is difficult for you to see which address and port the printer is connected to and put them in the code?
– Maniero
I guess you didn’t understand. I actually didn’t send sockets, I said sending them wouldn’t be the problem IF I had the IP and printer port. The problem itself is this. Know the IP and port and managed to connect besides knowing if it is a UDP or TCP connection...
– Carlos Alberto Chagas
And why can’t you look at which IP and port the press is on? Do people keep changing all the time? If you stay, there’s a reason for this?
– Maniero
Then as I had said above, yesterday I spent the day looking for solutions and in relation to the IP I took advantage and asked together, I did not succeed in being able to find the IP and printer port
– Carlos Alberto Chagas
Isn’t your problem to do PHP code to use the printer? Is it that you don’t know how to look at the server where it is connected? There the problem is not of programming.
– Maniero
Tell me one thing the server is windows? Why if it is you could use
COM
, if it’slinux
oneexec();
would help.– Guilherme Nascimento