blob: f187da0141a4def02330e74d8e985428a1fe6b03 (
plain)
- #!/bin/sh
- set -eu
- infile="$1"
- outfile="${2:-$(basename "$infile" .pdf)_gray.pdf}"
- # https://stackoverflow.com/questions/20128656
- gs \
- -sDEVICE=pdfwrite \
- -dPDFSETTINGS=/prepress \
- -sProcessColorModel=DeviceGray \
- -sColorConversionStrategy=Gray \
- -dOverrideICC \
- -o "$outfile" \
- -f "$infile"
|