volumetric-regimes-book/command-line/tools/rgb2cmyk.sh

15 lines
277 B
Bash
Executable File

#! /bin/bash
# CONVERTS RGB PDF TO CMYK PDF PRESERVING TRUE BLACK FOR VECTORS
# USAGE:
# ./rgb2cmyk.sh input.pdf
# OUTPUT:
# input-cmyk.pdf
bn=$(basename $1 ".pdf")
gs -q -sDEVICE=pdfwrite -o ${bn}-CMYK.pdf -sColorConversionStrategy=CMYK -sSourceObjectICC=control.txt $1