Saturday, September 30, 2023
 Popular · Latest · Hot · Upcoming
rated 0 times [  7] [ 0]  / answers: 1 / hits: 2829  / 1 Year ago, sun, july 24, 2022, 1:31:14

I have a pdf (having multiple pages) containing some colorful certificates, and need a black and white (grayscale) version of it.

Is there any way to make it grayscale with a single command, or with any simple GUI program (preferably FOSS)?

In principle, I can open all the pages separately in GIMP, make them grayscale, and rejoin, but that would take a lot of effort.

More From » pdf


A similar question and answer is there in Stack Overflow.

Convert has the great disadvantage of converting to bitmap images, whatever you do... Try this out:

gs -sOutputFile=outfile.pdf -sDEVICE=pdfwrite 
-sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray
-dCompatibilityLevel=1.4 infile.pdf < /dev/null

You have to redirect from /dev/null because by default, gs is interactive. There is a host of options available to tune the output, you can look at the pdfwrite parameters of ghostscript.

In this method, the output pdf does not blow up in size, and also, its quality does not degrade.

[#965] Monday, July 25, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 439
Total Questions: 99
Total Answers: 131

Location: Vanuatu
Member since Wed, Oct 14, 2020
3 Years ago
ettorina questions
Thu, Sep 1, 22, 15:28, 1 Year ago
Mon, Mar 14, 22, 06:04, 2 Years ago
Fri, Aug 26, 22, 12:02, 1 Year ago