Parent Directory | Revision Log
http://blog.rot13.org/2011/05/optimize-pdf-file-size-using-ghostscript.html
1 | dpavlin | 143 | #!/bin/sh -x |
2 | |||
3 | for=screen | ||
4 | |||
5 | cat << _FOR_OPTIONS_ | ||
6 | # screen low-resolution "Screen Optimized" | ||
7 | # ebook medium-resolution "eBook" | ||
8 | # printer output "Print Optimized" | ||
9 | # prepress output "Prepress Optimized" | ||
10 | # default | ||
11 | _FOR_OPTIONS_ | ||
12 | |||
13 | test ! -z "$2" && for=$2 | ||
14 | to=`echo $1 | sed "s/\.pdf/-$for.pdf/i"` | ||
15 | |||
16 | time gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/$for \ | ||
17 | -dNOPAUSE -dQUIET -dBATCH -sOutputFile=/tmp/$to $1 \ | ||
18 | && ls -al $1 /tmp/$to | ||
19 |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |