-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpdf2cmyk
executable file
·89 lines (78 loc) · 2.41 KB
/
pdf2cmyk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/usr/bin/sh
# https://bugs.launchpad.net/inkscape/+bug/574717
# http://zeroset.mnim.org/2014/07/14/save-a-pdf-to-cmyk-with-inkscape/
# https://stackoverflow.com/questions/6241282/converting-pdf-to-cmyk-with-identify-recognizing-cmyk
# Warning: -dSAFER causes errors on my system.
ICC=${2:-/usr/share/color/icc/ISOcoated_v2_eci.icc}
# Low resolution images:
# -dPDFSETTINGS=/prepress \
# Much larger file sizes:
# -dEncodeColorImages=false \
# -dEncodeGrayImages=false \
# -dEncodeMonoImages=false \
# Slow or blocked:
# -dHaveTransparency=false \
gs -o ${1%%.pdf}_cmyk.pdf \
-dBATCH -dNOPAUSE -dNOCACHE \
-sDEVICE=pdfwrite \
-sColorConversionStrategy=CMYK \
-dProcessColorModel=/DeviceCMYK \
-sDefaultCMYKProfile=$ICC \
-sOutputICCProfile=$ICC \
$1
#gs -o ${1%%.pdf}_cmyk.pdf \
# -dPDFX \
# -dBATCH \
# -dNOPAUSE \
# -dNOOUTERSAVE \
# -dPDFSETTINGS=/prepress \
# -dEncodeColorImages=false \
# -dEncodeGrayImages=false \
# -dEncodeMonoImages=false \
# -dCompatibilityLevel=1.4 \
# -dRenderIntent=3 \
# -sDEVICE=pdfwrite \
# -sColorConversionStrategy=CMYK \
# -sProcessColorModel=DeviceCMYK \
# -sDefaultCMYKProfile=$ICC \
# -sOutputICCProfile=$ICC \
# -sColorConversionStrategy=CMYK \
# -sColorConversionStrategyForImages=CMYK \
# $1
#gs -o ${1%%.pdf}_cmyk.pdf \
# -dNOPAUSE -dBATCH -dSAFER \
# -sDEVICE=pdfwrite \
# -dPDFSETTINGS=/prepress \
# -dEncodeColorImages=false \
# -dEncodeGrayImages=false \
# -dEncodeMonoImages=false \
# -dOverrideICC=true \
# -dHaveTransparency=false \
# -dCompatibilityLevel=1.4 \
# -dRenderIntent=3 \
# -dDeviceGrayToK=true \
# -sDefaultCMYKProfile=/usr/share/color/icc/ISOcoated_v2_eci.icc \
# -sOutputICCProfile=/usr/share/color/icc/ISOcoated_v2_eci.icc \
# -sProcessColorModel=DeviceCMYK \
# -sColorConversionStrategy=CMYK \
# -sColorConversionStrategyForImages=CMYK \
# $1
#gs -o ${1%%.pdf}_cmyk.pdf \
# -dSAFER -dBATCH \
# -dNOPAUSE -dNOCACHE -sDEVICE=pdfwrite \
# -sColorConversionStrategy=CMYK \
# -dProcessColorModel=/DeviceCMYK \
# $1
#gs -o ${1%%.pdf}_cmyk.pdf \
# -dPDFX \
# -dBATCH \
# -dNOPAUSE \
# -dNOOUTERSAVE \
# -dPDFSETTINGS=/prepress \
# -dCompatibilityLevel=1.5 \
# -sDEVICE=pdfwrite \
# -sColorConversionStrategy=CMYK \
# -sProcessColorModel=DeviceCMYK \
# -dHaveTransparency=false \
# PDFX_def.ps \
# $1