Created
March 22, 2017 15:47
-
-
Save brossetti/f557495fc31d37f029e49a658d2440c2 to your computer and use it in GitHub Desktop.
Prints a one-page double-sided preview of all PDFs in a specified directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script prints a one-page double-sided preview of all pdfs in a | |
# specified directory. It takes two arguments: 1) the name of the | |
# printer and 2) the directory path. This script does not specify a | |
# color mode or print quality. | |
# | |
# ./print_pdf_preview.sh <printer_name> <dir_path> | |
for f in $2*.pdf | |
do | |
lp -d $1 -P 1-2 -o fit-to-page -o sides=two-sided-long-edge $f | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment