Last active
December 8, 2017 04:08
-
-
Save davidaknowles/ba5a2b69f255b748782bd38fe25e4c41 to your computer and use it in GitHub Desktop.
Use ghostscript to convert PDFs to version 1.5 (better for pdflatex)
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 | |
set -e | |
outfile=$2 | |
if [ "$#" -eq 1 ]; then | |
outfile=$1 | |
fi | |
gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -dCompatibilityLevel=1.5 -sOutputFile=temp.pdf $1 | |
# so you can run on the same file | |
mv temp.pdf $outfile |
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 | |
set -e | |
for var in "$@" | |
do | |
./ghostscript_pdf_1p7_to_1p5.sh $var | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment