Rev | Line | |
---|
[17625] | 1 | #!/bin/sh
|
---|
| 2 | # $Id: pdfopt 8773 2008-05-25 02:17:14Z alexcher $
|
---|
| 3 | # Convert PDF to "optimized" form.
|
---|
| 4 |
|
---|
| 5 | # This definition is changed on install to match the
|
---|
| 6 | # executable name set in the makefile
|
---|
| 7 | GS_EXECUTABLE=gs
|
---|
| 8 | gs="`dirname $0`/$GS_EXECUTABLE"
|
---|
| 9 | if test ! -x "$gs"; then
|
---|
| 10 | gs="$GS_EXECUTABLE"
|
---|
| 11 | fi
|
---|
| 12 | GS_EXECUTABLE=gs
|
---|
| 13 |
|
---|
| 14 | OPTIONS="-dSAFER -dDELAYSAFER"
|
---|
| 15 | while true
|
---|
| 16 | do
|
---|
| 17 | case "$1" in
|
---|
| 18 | -?*) OPTIONS="$OPTIONS $1" ;;
|
---|
| 19 | *) break ;;
|
---|
| 20 | esac
|
---|
| 21 | shift
|
---|
| 22 | done
|
---|
| 23 |
|
---|
| 24 | if [ $# -ne 2 ]; then
|
---|
| 25 | echo "Usage: `basename $0` input.pdf output.pdf" 1>&2
|
---|
| 26 | exit 1
|
---|
| 27 | fi
|
---|
| 28 |
|
---|
| 29 | exec "$GS_EXECUTABLE" -q -dNODISPLAY $OPTIONS -- pdfopt.ps "$1" "$2"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.