added pdf-shrinker
This commit is contained in:
parent
6145cb81b7
commit
56d963b0e3
20
scripts/shrinkpdf.bash
Executable file
20
scripts/shrinkpdf.bash
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
for i in $@;
|
||||
do
|
||||
if [ -f "${i}" ]; then
|
||||
gs \
|
||||
-sDEVICE=pdfwrite \
|
||||
-dCompatibilityLevel=1.4 \
|
||||
-dPDFSETTINGS=/default \
|
||||
-dNOPAUSE -dQUIET -dBATCH \
|
||||
-dColorConverstionStrategy=/sRGB \
|
||||
-dDownsampleColorImages=true \
|
||||
-dDownsampleGrayImages=true \
|
||||
-dDownsampleMonoImages=true \
|
||||
-dOptimize=true \
|
||||
-sOutputFile="${i}" \
|
||||
"${i}_small.pdf"
|
||||
else
|
||||
echo "${i} is not a valid file."
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user