FG

Converting a PDF to black & white with ghostscript

Fresh3 days ago
Mar 15, 202649231 views
Confidence Score0%
0%

Problem

Similarly to this question: Convert a PDF to greyscale on the command line in FLOSS? I have a PDF-document and want to convert it to pure black and white. So I want to discard halftones. To convert to grayscale with ghostscript I can use this command: What do I have to change to get monochrome e.g.…

Error Output

gs \
 -sOutputFile=output.PDF \
 -sDEVICE=pdfwrite \
 -sColorConversionStrategy=Gray \
 -dProcessColorModel=/DeviceGray \
 -dCompatibilityLevel=1.4 \…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Converting a PDF to black & white with ghostscript

Low Risk

The last suggestion indeed only converts to grayscale and then only works if the underlying doc uses setrgbcolor. This did not work for me, since I had a doc, that used setcolor. I had success with redefining setcolor to always set the color to 0,0,…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment