How to print a PDF file from command line?
Use the following command: $lpr -Pprinter_name filename.pdf If you want to print a file named assignment.pdf at printer laser112, $lpr -Plaser112 assignment.pdf If you don’t specify the printer, the file is printed at the default printer. The default printer is the nearest printer from your computer. It is set in the environment variable PRINTER.