Send file directly to printer via CMD

Asked

Viewed 13,295 times

7

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

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.

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

If it is a USB printer you can use its own API for this, but it probably won’t be by cmd anymore, if you need a lot that is by cmd you can make a pool print on printer properties, to redirect to USB everything that is sent to the port you set up on pool.

To make 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 by Control Panel or Print Management.

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

inserir a descrição da imagem aqui

Apply the modifications.

PS: the image serves to illustrate what should be done because I don’t have a USB printer installed, the one I use is on the network.

  • It is on the USB port yes, more specifically on USB001

  • copy/b c:\\endereco\\do\\arquivo.ext usb001: will not work, have to make the print pool and associate a COM or LPT for her. Knows how to pool?

  • no, I don’t know...

  • right, and now I do with the USB001 after activating the pool?

  • 1

    You leave both the USB001 marked as well as a COM port in the window I showed in the reply, then you pass the command to COM you chose, then the print will be redirected to USB. In my image has not USB001 why I do not have a printer connected on my computer, the one I use is on the network, why this window shows me her IP.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.