Newer
Older
Lecture_repo / Lectures_my / KT2_2017 / Lecture2 / images / derotate.sh
@Marcin Chrzaszcz Marcin Chrzaszcz on 11 May 2017 342 bytes lec 2 done
#!/bin/bash
#FILES=*.pdf
FILES="$(find . -name '*.pdf')"
for f in $FILES
do
	echo "Processing $f ..."
	gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dUseCIEColor -dPDFSETTINGS=/printer -dSAFER -dNOPAUSE -dQUIET -dBATCH -sOutputFile="temp.pdf" "$f"
	mv temp.pdf "$f"
#	pdf2ps "$f" temp.ps
#	ps2pdf temp.ps "$f"
#	rm temp.ps
done
#rm temp.pdf