Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Recompress all the PDF's in the current directory
- # with ImageMagic convert utility for less volume.
- # -------------------------------------------------
- # Experiment with these settings for optimal result
- # QUALITY : 1..99 / JPEG compression quality
- # DENSITY : 100..600 / Dots per inch (VxH)
- QUALITY=30
- DENSITY=150
- # -------------------------------------------------
- for FILE in *.pdf ; do
- echo -en "Compressing file ${FILE}... "
- convert -density ${DENSITY}x${DENSITY} -quality ${QUALITY} -compress jpeg "${FILE}" "${FILE}_recompressed.pdf" && echo -e "OK"
- done
Advertisement
Add Comment
Please, Sign In to add comment