source: other-projects/trunk/mac-binaries/intel/ghostscript/bin/dvipdf@ 19632

Last change on this file since 19632 was 17625, checked in by max, 16 years ago

Adding GhostScript 8.63 for Intel Mac and changing the location of ImageMagick 6.4.4 for Intel Mac that can process JPEG2000 files by default.

File size: 1.0 KB
Line 
1#!/bin/sh
2# $Id: dvipdf 8773 2008-05-25 02:17:14Z alexcher $
3# Convert DVI to PDF.
4#
5# Please contact Andrew Ford <[email protected]> with any questions
6# about this file.
7#
8# Based on ps2pdf
9
10# This definition is changed on install to match the
11# executable name set in the makefile
12GS_EXECUTABLE=gs
13
14
15OPTIONS=""
16DVIPSOPTIONS=""
17while true
18do
19 case "$1" in
20 -R*) DVIPSOPTIONS="$DVIPSOPTIONS $1";;
21 -?*) OPTIONS="$OPTIONS $1" ;;
22 *) break ;;
23 esac
24 shift
25done
26
27if [ $# -lt 1 -o $# -gt 2 ]; then
28 echo "Usage: `basename $0` [options...] input.dvi [output.pdf]" 1>&2
29 exit 1
30fi
31
32infile=$1;
33
34if [ $# -eq 1 ]
35then
36 case "${infile}" in
37 *.dvi) base=`basename "${infile}" .dvi` ;;
38 *) base=`basename "${infile}"` ;;
39 esac
40 outfile="${base}".pdf
41else
42 outfile=$2
43fi
44
45# We have to include the options twice because -I only takes effect if it
46# appears before other options.
47exec dvips $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite -
Note: See TracBrowser for help on using the repository browser.