Skip to content

Instantly share code, notes, and snippets.

@seraphyn
Last active December 31, 2015 00:49
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 seraphyn/7910017 to your computer and use it in GitHub Desktop.
Save seraphyn/7910017 to your computer and use it in GitHub Desktop.
Shellscript um mit Hilfe von ghostscript PDFs zu verkleinern. Die DPI liegt bei 72 und sollte für Retina dann eher in Richtung 200 geändert werden. Ich habe so ein Display am Thinkpad nicht und somit ist es für mich noch obsolet. Aber die dpi sind ausreichend für "normale" Androidsmartphones und Tablets im Moment
#!/bin/sh
# Original by Alfred Klomp
gs -q -dNOPAUSE -dBATCH -dSAFER \
-sDEVICE=pdfwrite \
-dCompatibilityLevel=1.3 \
-dPDFSETTINGS=/screen \
-dEmbedAllFonts=true \
-dSubsetFonts=true \
-dColorImageDownsampleType=/Bicubic \
-dColorImageResolution=72 \
-dGrayImageDownsampleType=/Bicubic \
-dGrayImageResolution=72 \
-dMonoImageDownsampleType=/Bicubic \
-dMonoImageResolution=72 \
-sOutputFile=out.pdf \
$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment