Tag: pdf

  • Convert PDF to grayscale using Ghostscript

    This is a Bash function I have in my .bashrc. This function uses Ghostscript (gs), which must be installed in the system. # Convert pdf to grayscale function pdf2gray { gs \ -sDEVICE=pdfwrite \ -sProcessColorModel=DeviceGray \ -sColorConversionStrategy=Gray \ -dOverrideICC \ -f $1 \ -o $2 } In this example a file called abc.pdf is converted…