Created
September 11, 2017 10:05
-
-
Save ljrk0/17b136ef1286e1ff9c49e63f9c04b2da to your computer and use it in GitHub Desktop.
Convert a letter pdf into A4
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/sh | |
IN="$1" | |
OUT="$2" | |
if [ -z $1 ] || [ -z $2 ]; then | |
echo "not enough args" | |
fi | |
pdf2ps -q -sOutputFile=%stdout% "$IN" | \ | |
gs -dSAFER -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \ | |
-sPAPERSIZE=a4 -dFIXEDMEDIA -sOutputFile="$OUT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment