scripts for doing things with PDFs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
426 B

#! /bin/bash
pdffile=$1;
dpi=$2
gs \
-o "${pdffile%.pdf}-resampled.pdf" \
-sDEVICE=pdfwrite \
-dDownsampleColorImages=true \
-dDownsampleGrayImages=true \
-dDownsampleMonoImages=true \
-dColorImageResolution=$dpi \
-dGrayImageResolution=$dpi \
-dMonoImageResolution=$dpi \
-dColorImageDownsampleThreshold=1.0 \
-dGrayImageDownsampleThreshold=1.0 \
-dMonoImageDownsampleThreshold=1.0 \
"${pdffile}"