Sending pdf files directly to a network printer, using Windows command line

I have network printers. The new one is a Kyocera P2135dn and can handle PDF documents directly: When I pull a pdf-file into the print-spool-window, the file gets printed properly and no driver dialog window pops up, no Adobe tools involved, I believe. If I take the same pdf-file to the printer via usb-flash-drive, it also prints fine. Now I have got several hundred pdf-files (all nicely named like 0001.pdf etc.) in one folder and I want to send them to the printer via the windows command line. (Background: In the next step, I want to wrap hundreds of those commands in a Phyton script, but first I want to learn and test this "manually".) In the past we have used GSprint from the GSview tool. It is still working, but is internally creating huge bitmap files and is slow to render and also slow over the network (even though the printer has got a fast connection). Typically I can only print about four pages per minute, and I have got hundreds to print. (The new GSview from Artifex does not include any GSprint. So we want to figure out a new workflow.) I am just looking for the right command to send my pdf to the printer, which is properly configured via standard TCP/IP-port. I am working on Windows 10 pro, 64bit. I managed to activate lpr on my windows and tried (just in cases) to send the file, and got it sent; but it does not get reckognized as a valid pdf (no surprise) and the printer is just printing lots of gibberish. So please just tell me what command is needed to send a "binary" accross the network to my printer. And I will read up on it and hopefully figure out the syntax. I believe command line is best - to later integrate into a Phyton script. But Power Shell command might also help me. (If you want to send examples, that would be awesome, but is optional.) File is this, for example: C:\Users\martin\MyDocument.pdf Printer port is called "192.168.0.200" (this is its name, no typo) Thank you.

asked Oct 16, 2017 at 19:41 Martin Zaske Martin Zaske 310 1 1 gold badge 5 5 silver badges 17 17 bronze badges

You can use Foxit Reader to print from the command line, e.g. "Foxit Reader.exe" /t "FileName" "PrinterName"

Commented Oct 17, 2017 at 0:00

@hdhondt Thank you. Are you saying indirectly that what I want cannot be done? When I am already on the command line, why would I employ a rather massive tool to send a ready pdf to a printer who can handle it "as is"? I had hoped for something "native" to the command line. If nothing else comes up as answers, I will try your idea and time it versus our old GSprint workflow. Will let you know.

Commented Oct 17, 2017 at 17:53

Very few printers can handle a PDF directly. Of those that do, most require the PDF to be sent via a special utility or some other specific way. For your printer, that's "KYOCERA Net Direct Print".

Commented Oct 17, 2017 at 21:19

@hdhondt I had made certain assumptions. Our printer has got an USB-slot and can print PDF documents directly from a normal USB-memory-stick (which does not provide any logic as far as I know). So I assume that our printer can indeed handle PDF files directly. Would be a shame, if file-coming-via-the-network-rather-than-from-local-USB would somehow prevent the printer from its own competence. Still thank you for all input.