pdf_scripts/rgb2cmyk.sh

18 lines
447 B
Bash
Executable file

#!/bin/bash
name=$1
pdftops -level3sep "$name" "$name.ps"
# PS to PDF using replacement function in HackRGB-cmyk-inv.ps
gs \
-dNOPAUSE \
-dBATCH \
-sDEVICE=pdfwrite \
-sColorConversionStrategy=CMYK \
-dProcessColorModel=/DeviceCMYK \
-dCompatibilityLevel=1.4 \
-dAutoRotatePages=/None \
-dOverrideICC \
-dNoOutputFonts \
-sOutputFile="$name-cmyk.pdf" \
~/bin/HackRGB-cmyk-inv.ps \
"$name.ps"
rm -f "$name.ps"