Command line print PDF files to a Windows printer

This article describes the steps to print PDF files to a Windows printer using RPM Remote Print Manager® ("RPM"). Using RPM, you can set this up to run on-demand day and night. Any time you sent a PDF file to RPM, your hard copy will soon be waiting.


RPM is our virtual printer software. It prints to more than one printerarchives to disk, converts print jobs to PDF, and many other operations.

RPM will run a local program on your print job. (We call this a filter action from our background in Linux.) All you need to do is install the application on your system, and RPM is ready to run it.

We describe below how you print PDF files without selecting and clicking each file.

Many people use RPM to print, and at the same time, submit the PDF to a document management system or archive to disk. Often they use RPM to watermark the PDF before printing.

What happens when you view a PDF

When you double-click on a file, Windows uses the extension to look up the viewer program. You've seen what happens when you try to open a file and Windows asks what program you want to use.

When you view a PDF, Windows launches the viewer program and passes the path for your PDF on the command line. Don't worry if you are not familiar with that term! It just means the application can start viewing your PDF without asking you first for the file.

Getting started

Foxit Reader is a PDF viewer by Foxit Software that displays and prints PDF files. This program seems to be popular with our customers, although these recommendations should work with any PDF viewer.

Now, here are the steps to print a PDF on the command line using the Foxit Reader.

  1. Do a web search on "download foxit reader" Follow the steps to download and install. When I ran this search, I found the software on, but your results may vary.
  2. Printer name: Go to your Start menu and select "Devices and Printers." Depending on the version of Windows you'll see a form like the following:
    Windows Devices and Printers

    Windows Devices and Printers

    Select the printer you want to use. Right-click on this printer and select "Properties." You should get a window that resembles the following:

    Brother printer properties

    Brother printer properties

    Please note how selecting the printer highlights the printer's name. Copy this name to the clipboard.

  3. Command-line: The command line consists of these parts:
  • the path to the reader program, in quotes; for instance, on my system, it is "C:\Program Files (x86)\Foxit Software\Foxit Reader\Foxit Reader.exe"
  • the switch /t
  • the path to the PDF file
  • the name of the printer, in quotes; for instance, "Brother MFC-7840W"

For example, to print the file "temp.pdf," you would do this at a command-line prompt:

"C:\Program Files (x86)\Foxit Software\Foxit Reader\Foxit Reader.exe" /t temp.pdf "Brother MFC-7840W"

When you do this, the only response you are likely to get is the printer warming up and your print job coming out. Foxit Reader does not seem to provide much feedback on whether this operation is successful or not.

You may be asking--why go to the trouble of documenting a way to print something from a DOS command line? Please go to the related article, Printing PDF files from RPM Remote Print Manager, for our perspective on this.


Please note: while describing how to work with the Foxit software, we have no affiliation with Foxit Corporation.

Last updated November 7, 2019