Tools for generating the Volumetric Regimes book https://volumetricregimes.xyz/ (wiki-to-print, using Paged.js)
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.
25 lines
797 B
25 lines
797 B
#! /bin/bash
|
|
|
|
# CONVERTS RGB PDF TO CMYK PDF PRESERVING TRUE BLACK FOR VECTORS
|
|
# OVERPRINT FEATURE IS AVAILABLE WITH AN OPTION
|
|
|
|
# USAGE:
|
|
# ./rgb2cmyk.sh input.pdf
|
|
# ./rgb2cmyk.sh input.pdf overprint
|
|
|
|
# OUTPUT:
|
|
# input-cmyk.pdf
|
|
# input-cmyk-op.pdf (in case of overprint)
|
|
|
|
bn=$(basename $1 ".pdf")
|
|
|
|
gs -q -sDEVICE=pdfwrite -o ${bn}-CMYK.pdf -sColorConversionStrategy=CMYK -sSourceObjectICC=control.txt $1
|
|
|
|
# OVERPRINT COMMANDS BELOW
|
|
|
|
pdftops -level2sep ${bn}-CMYK.pdf
|
|
sed -e "s/false \(op\)/true \1/gI" ${bn}-CMYK.ps > ${bn}-CMYK-op.ps
|
|
#gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=${bn}-CMYK-op.pdf ./forceblack.ps ${bn}-CMYK-op.ps
|
|
gs -q -sDEVICE=pdfwrite -o ${bn}-CMYK-op.pdf -sColorConversionStrategy=CMYK -sSourceObjectICC=control.txt ${bn}-CMYK-op.ps
|
|
#rm ${bn}-CMYK.pdf
|
|
rm ${bn}-CMYK.ps
|
|
|