From fa77698fa10c49345327e7f5446d84ff055938da Mon Sep 17 00:00:00 2001 From: L Peter Deutsch Date: Fri, 10 Mar 2000 07:51:55 +0000 Subject: Adds a new eps2eps utility analogous to ps2ps. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@55 a1074d23-0009-0410-80fe-cf8c14f379e6 --- gs/lib/eps2eps | 20 ++++++++++++++++++++ gs/lib/eps2eps.bat | 24 ++++++++++++++++++++++++ gs/man/eps2eps.1 | 22 ++++++++++++++++++++++ gs/man/ps2ps.1 | 7 +++++-- gs/src/unixinst.mak | 7 ++++--- 5 files changed, 75 insertions(+), 5 deletions(-) create mode 100755 gs/lib/eps2eps create mode 100755 gs/lib/eps2eps.bat create mode 100644 gs/man/eps2eps.1 diff --git a/gs/lib/eps2eps b/gs/lib/eps2eps new file mode 100755 index 000000000..120162e89 --- /dev/null +++ b/gs/lib/eps2eps @@ -0,0 +1,20 @@ +#!/bin/sh +# $Id$ +# "Distill" Encapsulated PostScript. + +OPTIONS="-dDEVICEWIDTH=250000 -dDEVICEHEIGHT=250000" +while true +do + case "$1" in + -*) OPTIONS="$OPTIONS $1" ;; + *) break ;; + esac + shift +done + +if [ $# -ne 2 ]; then + echo "Usage: `basename $0` ...switches... input.eps output.eps" 1>&2 + exit 1 +fi + +exec gs -q -sDEVICE=epswrite -sOutputFile=$2 -dNOPAUSE -dBATCH $OPTIONS $1 diff --git a/gs/lib/eps2eps.bat b/gs/lib/eps2eps.bat new file mode 100755 index 000000000..fdcd566c9 --- /dev/null +++ b/gs/lib/eps2eps.bat @@ -0,0 +1,24 @@ +@echo off +@rem $Id$ +@rem "Distill" Encapsulated PostScript. + +if "%1"=="" goto usage +if "%2"=="" goto usage +echo -dNODISPLAY -dNOPAUSE -dBATCH >_.at +rem Watcom C deletes = signs, so use # instead. +echo -dDEVICEWIDTH#250000 -dDEVICEHEIGHT#250000 >>_.at +:cp +if "%3"=="" goto doit +echo %1 >>_.at +shift +goto cp + +:doit +rem Watcom C deletes = signs, so use # instead. +gs -q -sDEVICE#epswrite -sOutputFile#%2 @_.at %1 +goto end + +:usage +echo "Usage: eps2eps ...switches... input.eps output.eps" + +:end diff --git a/gs/man/eps2eps.1 b/gs/man/eps2eps.1 new file mode 100644 index 000000000..1d1978fa2 --- /dev/null +++ b/gs/man/eps2eps.1 @@ -0,0 +1,22 @@ +.\" $Id$ +.TH PS2PS 1 "21 February 2000" 6.01 "Ghostscript Tools" \" -*- nroff -*- +.SH NAME +eps2eps \- Ghostscript Encapsulated PostScript "distiller" +.SH SYNOPSIS +\fBeps2eps\fR [ \fIoptions\fR ] \fIinput.eps output.eps\fR +.SH DESCRIPTION +\fBeps2eps\fR uses \fIgs\fR(1) to convert Encapsulated \fBPostScript\fR(tm) +file "input.eps" to simpler and (usually) faster Encapsulated PostScript in +"output.eps". Normally the output is allowed to use PostScript Level 2 +constructs, but the \fB\-dLanguageLevel=1\fR option restricts the output to +Level 1. +.PP +Use \fBeps2eps\fR only for Encapsulated PostScript (EPS) files; for +ordinary PostScript (PS) files, use \fBps2ps\fR. +.SH FILES +Run "\fBgs -h\fR" to find the location of Ghostscript documentation on your +system, from which you can get more details. +.SH VERSION +This document was last revised for Ghostscript version 6.01. +.SH AUTHOR +L. Peter Deutsch diff --git a/gs/man/ps2ps.1 b/gs/man/ps2ps.1 index f214b996c..1af88869c 100644 --- a/gs/man/ps2ps.1 +++ b/gs/man/ps2ps.1 @@ -1,5 +1,5 @@ .\" $Id$ -.TH PS2PS 1 "3 February 2000" 6.0 "Ghostscript Tools" \" -*- nroff -*- +.TH PS2PS 1 "21 February 2000" 6.0 "Ghostscript Tools" \" -*- nroff -*- .SH NAME ps2ps \- Ghostscript PostScript "distiller" .SH SYNOPSIS @@ -10,10 +10,13 @@ ps2ps \- Ghostscript PostScript "distiller" "output.ps". Normally the output is allowed to use PostScript Level 2 constructs, but the \fB\-dLanguageLevel=1\fR option restricts the output to Level 1. +.PP +Use \fBps2ps\fR only for ordinary PostScript (PS) files; for +Encapsulated PostScript (EPS) files, use \fBeps2eps\fR. .SH FILES Run "\fBgs -h\fR" to find the location of Ghostscript documentation on your system, from which you can get more details. .SH VERSION -This document was last revised for Ghostscript version 6.0. +This document was last revised for Ghostscript version 6.01. .SH AUTHOR L. Peter Deutsch diff --git a/gs/src/unixinst.mak b/gs/src/unixinst.mak index 0cd492242..3e073cac3 100644 --- a/gs/src/unixinst.mak +++ b/gs/src/unixinst.mak @@ -43,7 +43,7 @@ install-scripts: $(PSLIBDIR)/gsnd -mkdir $(scriptdir) $(SH) -c 'for f in \ gsbj gsdj gsdj500 gslj gslp gsnd \ -bdftops dvipdf font2c \ +bdftops dvipdf eps2eps font2c \ pdf2dsc pdf2ps pf2afm pfbtopfa printafm \ ps2ascii ps2epsi ps2pdf ps2pdf12 ps2pdf13 ps2pdfwr ps2ps wftopfa \ fixmswrd.pl lprsetup.sh pj-gs.sh pv.sh sysvlp.sh unix-lpr.sh ;\ @@ -54,8 +54,9 @@ PSDOCDIR=$(PSLIBDIR)/../doc PSEXDIR=$(PSLIBDIR)/../examples PSMANDIR=$(PSLIBDIR)/../man -MAN1_PAGES=gs pdf2dsc pdf2ps ps2ascii ps2epsi ps2pdf ps2ps \ - gslp gsnd dvipdf font2c pf2afm pfbtopfa printafm ps2pdfwr wftopfa +MAN1_PAGES=gs gslp gsnd dvipdf eps2eps font2c pdf2dsc pdf2ps \ + pf2afm pfbtopfa printafm ps2ascii ps2epsi \ + ps2pdf ps2pdfwr ps2ps wftopfa MAN1_PS2PDF_LINKS=ps2pdf12 ps2pdf13 MAN1_GSLP_LINKS=gsbj gsdj gsdj500 gslj # There's no point in providing a complete dependency list: we include -- cgit v1.2.3