summaryrefslogtreecommitdiff
path: root/localps2pdfprepressgray
blob: f187da0141a4def02330e74d8e985428a1fe6b03 (plain)
  1. #!/bin/sh
  2. set -eu
  3. infile="$1"
  4. outfile="${2:-$(basename "$infile" .pdf)_gray.pdf}"
  5. # https://stackoverflow.com/questions/20128656
  6. gs \
  7. -sDEVICE=pdfwrite \
  8. -dPDFSETTINGS=/prepress \
  9. -sProcessColorModel=DeviceGray \
  10. -sColorConversionStrategy=Gray \
  11. -dOverrideICC \
  12. -o "$outfile" \
  13. -f "$infile"