summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlocalps2pdfprepressgray16
-rwxr-xr-xlocalps2pdfprepressgray1317
-rwxr-xr-xlocalps2pdfprepressrgb16
-rwxr-xr-xlocalps2pdfprepressrgb1317
-rwxr-xr-xlocalps2pdfscreen2
5 files changed, 68 insertions, 0 deletions
diff --git a/localps2pdfprepressgray b/localps2pdfprepressgray
new file mode 100755
index 0000000..f187da0
--- /dev/null
+++ b/localps2pdfprepressgray
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -eu
+
+infile="$1"
+outfile="${2:-$(basename "$infile" .pdf)_gray.pdf}"
+
+# https://stackoverflow.com/questions/20128656
+gs \
+ -sDEVICE=pdfwrite \
+ -dPDFSETTINGS=/prepress \
+ -sProcessColorModel=DeviceGray \
+ -sColorConversionStrategy=Gray \
+ -dOverrideICC \
+ -o "$outfile" \
+ -f "$infile"
diff --git a/localps2pdfprepressgray13 b/localps2pdfprepressgray13
new file mode 100755
index 0000000..fe9a157
--- /dev/null
+++ b/localps2pdfprepressgray13
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -eu
+
+infile="$1"
+outfile="${2:-$(basename "$infile" .pdf)_gray13.pdf}"
+
+# https://stackoverflow.com/questions/20128656
+gs \
+ -sDEVICE=pdfwrite \
+ -dPDFSETTINGS=/prepress \
+ -sProcessColorModel=DeviceGray \
+ -sColorConversionStrategy=Gray \
+ -dOverrideICC \
+ -dCompatibilityLevel=1.3 \
+ -o "$outfile" \
+ -f "$infile"
diff --git a/localps2pdfprepressrgb b/localps2pdfprepressrgb
new file mode 100755
index 0000000..5da1e49
--- /dev/null
+++ b/localps2pdfprepressrgb
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -eu
+
+infile="$1"
+outfile="${2:-$(basename "$infile" .pdf)_rgb.pdf}"
+
+# https://stackoverflow.com/questions/20128656
+gs \
+ -sDEVICE=pdfwrite \
+ -dPDFSETTINGS=/prepress \
+ -sProcessColorModel=DeviceRGB \
+ -sColorConversionStrategy=RGB \
+ -dOverrideICC \
+ -o "$outfile" \
+ -f "$infile"
diff --git a/localps2pdfprepressrgb13 b/localps2pdfprepressrgb13
new file mode 100755
index 0000000..7a66b77
--- /dev/null
+++ b/localps2pdfprepressrgb13
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -eu
+
+infile="$1"
+outfile="${2:-$(basename "$infile" .pdf)_rgb13.pdf}"
+
+# https://stackoverflow.com/questions/20128656
+gs \
+ -sDEVICE=pdfwrite \
+ -dPDFSETTINGS=/prepress \
+ -sProcessColorModel=DeviceRGB \
+ -sColorConversionStrategy=RGB \
+ -dOverrideICC \
+ -dCompatibilityLevel=1.3 \
+ -o "$outfile" \
+ -f "$infile"
diff --git a/localps2pdfscreen b/localps2pdfscreen
new file mode 100755
index 0000000..51a1d00
--- /dev/null
+++ b/localps2pdfscreen
@@ -0,0 +1,2 @@
+#!/bin/sh
+ps2pdf -dPDFSETTINGS=/screen "$1"