How to print a pdf document using a command line?

Using command line to print documents is always helpful in batch process with scripts. VeryPDF PDFPrint is a smart program for printing pdf documents to physical or virtual printers in command line mode. This article is to introduce some basic usages of PDFPrint.

First of all, you need to download the package of the program at http://goo.gl/DV9Yz and extract the it into your preferred directory, for example, “D:\”. The new directory containing all the program elements will be created, and the executable file “pdfprint.exe” in the directory is for running in the MS-DOS command line mode.

Launch your MS-DOS command line prompt window and set the current directory to where PDFPrint is stored. A basic command line for using the program is

pdfprint.exe readme.pdf <Enter>,

where “pdfprint.exe” is the executable file and “readme.pdf” is the document to be printed. This command line will print the pdf document to the system default printer using all default settings. If you want to use other printer instead of the default one, you can use the following commands with “-prompt” option.

pdfprint.exe -prompt readme.pdf  <Enter>,

in which, “-prompt” option will start a “Print” dialog of choosing a printer as presented in the following snapshot.

image

In the dialog, you may choose another printer instead of the system default one in the “Name” dropdown list and set the properties of the printer via clicking the “Properties” button. The settings of “Print range” and “Copies” number in the dialog are also customizable using command line options.

“-firstpage” option sets the page number from which to print and “-lastpage” sets the page number at which to end the printing. The following two command lines are the examples:

pdfprint.exe readme.pdf -firstpage 2 <Enter>

will print the document of “readme.pdf” from page 2 to the last page,

pdfprint.exe readme.pdf -lastpage 2 <Enter>

will print the document of “readme.pdf” from the first page to page 2,

and

pdfprint.exe readme.pdf -firstpage 2 -lastpage 2 <Enter>

prints the document from page 2 to page 2, so only page 2 will be printed. The next snapshot presents the process of one of the  examples above.

image

Almost all settings supported by printers can be determined by PDFPrint in command line mode. For more command options, please visit http://goo.gl/l5RDv.

VN:F [1.9.20_1166]
Rating: 9.0/10 (1 vote cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)
How to print a pdf document using a command line?, 9.0 out of 10 based on 1 rating

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!