Janis Lesinskis' Blog

Assorted ramblings

  • All entries
  • About me
  • Projects
  • Economics
  • Misc
  • Software-engineering
  • Sports

Converting PDFs to greyscale


Lately I had some PDF documents that I had to convert to greyscale.

Doing this by hand is annoying if you have to do a lot of them. Thankfully there's a ghostscript command that will help:

gs \
 -sOutputFile=output_greyscale.pdf \
 -sDEVICE=pdfwrite \
 -sColorConversionStrategy=Gray \
 -dProcessColorModel=/DeviceGray \
 -dCompatibilityLevel=1.4 \
 -dNOPAUSE \
 -dBATCH \
 -dAutoRotatePages=/None \ 
 input_color.pdf
Published: Mon 02 June 2025
By Janis Lesinskis
In Software-engineering
Tags: pdf automation document-automation

links

  • Amazon wishlist

social

  • My GitHub page
  • LinkedIn

Proudly powered by Pelican, which takes great advantage of Python.