Skip to content

Instantly share code, notes, and snippets.

@skaag
Created August 29, 2017 18:36
Show Gist options
  • Save skaag/445fd5c398acad21fcd37d5b8dadd20b to your computer and use it in GitHub Desktop.
Save skaag/445fd5c398acad21fcd37d5b8dadd20b to your computer and use it in GitHub Desktop.
Ghostscript recipe to convert a PDF to mono
gs -o $1-mono.pdf \
-sDEVICE=pdfwrite \
-r600 \
-dCompatibilityLevel=1.4 \
-dPDFSETTINGS=/screen \
-dEmbedAllFonts=true \
-dSubsetFonts=true \
-sColorConversionStrategy=/Mono \
-sColorConversionStrategyForImages=/Mono \
-c "/osetrgbcolor {/setrgbcolor} bind def /setrgbcolor {pop [0 0 0] osetrgbcolor} def" \
-f $1.pdf
@i3v
Copy link

i3v commented Mar 19, 2019

Devs say (1,2,3,4) that there's no -sColorConversionStrategyForImages switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment