Skip to content

Instantly share code, notes, and snippets.

@artickl
Last active August 19, 2024 15:56
Show Gist options
  • Save artickl/dc5931270bf4e1d838e304d3096d8be7 to your computer and use it in GitHub Desktop.
Save artickl/dc5931270bf4e1d838e304d3096d8be7 to your computer and use it in GitHub Desktop.
PDF Gray Scale Size reduction (~6.5Mb to 0.8Mb)
# https://superuser.com/questions/104656/convert-a-pdf-to-greyscale-on-the-command-line-in-floss/164857#164857
gs \
-sOutputFile=output.pdf \
-sDEVICE=pdfwrite \
-sColorConversionStrategy=Gray \
-dProcessColorModel=/DeviceGray \
-dCompatibilityLevel=1.4 \
-dNOPAUSE \
-dBATCH \
input.pdf
@artickl
Copy link
Author

artickl commented Aug 19, 2024

No quality loss looks very good and much better compared to:
convert -colorspace GRAY color.pdf gray.pdf

even if -density 400 -quality 100 are used, which giving the final size of 5Mb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment