PDF printing from the command-line again

  • From: Edward Mendelson <em36@xxxxxxxxxxxx>
  • To: xywrite@xxxxxxxxxxxxx
  • Date: Tue, 7 Feb 2017 22:29:43 -0500

This time I’ll get it right. A convenient way to print PDF files from the 
command-line (and therefore from vDos and anything derived from vDos) is the 
PDF-Xchange Viewer, which is now free for any purpose:

https://www.tracker-software.com/product/pdf-xchange-viewer

It can be a bit tricky to set up so that it automatically prints to correct 
page size for envelopes, A4, etc., and it easily loses its settings if you use 
it to do anything with a PDF file other than simply print from the command 
line. 

Unlike Adobe Reader or Acrobat, it doesn’t stay open after printing from the 
command-line. Unlike SumatraPDF (another program that prints from the 
command-line), it can print non-standard page sizes (envelopes, Legal, etc.) 
from the correct paper source in the printer.
 
So I’ve put together a “wrapper" around PDF-Xchange Viewer that always 
maintains the correct settings for command-line printing. You do not need to 
download the PDF-Xchange Viewer; it’s included in the wrapper itself. The 
wrapper program is described here (with a download link):

http://www.columbia.edu/~em36/pdftoprinter.html

Of course this should be regarded as experimental, but it seems to work. I 
can’t guarantee whether it will work in all circumstances, but it may be worth 
a try. Or you could simply use the PDF-Xchange Viewer with the command-line 
syntax described in its manual.

Other related posts: