Category: Uncategorized

  • 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…

  • Swap File (Linux)

    There is a way to use a file as swap space in Linux. This can be used if large swap space is needed temporarily. To enable this, follow the instructions on this page: CentOS 5 document: Creating a Swap File To disable (1st line) and remove (2nd line) the swapfile: swapoff /path/to/swapfile rm /path/to/swapfile