So, I fired up the browser and started searching for ways to print from the command line and got lucky with the first hit. 'lp' is a command line tool that submits files for printing or alters a pending job and it is very easy to use. To print a bunch of pdf files in a folder, type the following commands in the terminal:
# Printing to default printer.More information is available in the man document for 'lp'.
lp *.pdf
# Printing a document to the default printer in landscape mode
lp -o landscape foo.pdf
# Printing the first and the second pages of the document
lp -P 1,2 foo.pdf
# Printing pages between 4 and 20 in landscape mode
lp -P 4-20 -o landscape foo.pdf
# Printing to a non-default printer called "bar"
lp -d "bar" foo.pdf
P.S.: I did not use 'really' in this blog post. Oops!! I think I just did it again.
No comments:
Post a Comment