Send file directly to printer via CMD

7

Does anyone know how I can send a txt file (with EPL commands) manually to the printer by cmd?

    
asked by anonymous 08.04.2015 / 15:33

1 answer

6

You can copy the file to the printer port, like this:

copy/b c:\endereco\do\arquivo.ext com3:

Assuming the printer is on the COM3 port.

/b is to indicate that the contents of the file is to be considered in its binary form, it is the most guaranteed way that your file will arrive exactly as it is to the printer.

If it's a USB printer you can use its own API for this, but it probably will not be over cmd, if you need too much for cmd you can do a pool printer, to redirect to USB everything that is sent to the port you set up in pool .

To do the pool , go to the properties of the printer, it depends a little on Windows for Windows how to get to it, but it is usually through the Control Panel or Print Management.

Check the "Enable print pool" option at the bottom of this window. Initially only one checkbox will be selected, also select a COM port, as shown below:

Apply the modifications.

PS: The image is to illustrate what should be done because I do not have a USB printer installed, which I use is on the network.

    
08.04.2015 / 16:00