Skip to content

Instantly share code, notes, and snippets.

@asolkar
Last active June 25, 2018 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asolkar/b82ce0848716a4e9b3d466f9c87465da to your computer and use it in GitHub Desktop.
Save asolkar/b82ce0848716a4e9b3d466f9c87465da to your computer and use it in GitHub Desktop.
Linux commands to reduce size of PDF files

Linux commands to reduce size of PDF files

This requires ImageMagick packages to be installed.

  • Reduce quality and remove color:
% convert -colorspace GRAY -density 150x150 -quality 80 -compress jpeg LargeSize.pdf SmallSizeGray.pdf 
  • Reduce quality, preserve color:
% convert -density 150x150 -quality 80 -compress jpeg LargeSize.pdf SmallSize.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment