18 lines
292 B
Bash
Executable File
18 lines
292 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ $# -ne 2 ]; then
|
|
cat<<EOF
|
|
Usage: ${0##*/} INPUT OUTPUT
|
|
|
|
Resize input PDF to an A4 output PDF.
|
|
EOF
|
|
exit
|
|
fi
|
|
|
|
if [ ! -f "$1" ]; then
|
|
echo "$1 is not a valid file."
|
|
fi
|
|
|
|
gs -q -o "$2" -sDEVICE=pdfwrite -sPAPERSIZE=a4 -dFIXEDMEDIA -dPDFFitPage -dCompatibilityLevel=1.4 "$1"
|
|
|