PostScript Utilities	        Angus Duggan		      4 April 1995

This archive contains some utilities for manipulating PostScript documents.
Page selection and rearrangement are supported, including arrangement into
signatures for booklet printing, and page merging for n-up printing.

ENVIRONMENT

These utilities have been compiled and run on Sun-3 and Sun-4 machines under
SunOS Solaris 2.3, Solaris 2.1, 4.1.3, 4.1.2, 4.1.1 and 4.0.1, HP9000/375
machines under HPUX 7.0 and HPUX 8.0, Sequent Symmetry machines under Dynix
3.1.4 and PTX 3.2.0, IBM RS/6000, VAX/VMS, Decstation 3100 machines under
Ultrix 4.0, SGI 4k5 under Irix 4.1 and 5.2, and 486 machines under MSDOS 6.0
and Windows NT 3.5.

FILES

The files contained are:
-rw-r--r--   1 angus       2270 Apr  4 14:47 LICENSE
-rw-r--r--   1 angus       2699 Apr  4 14:39 Makefile.msc
-rw-r--r--   1 angus       4506 Apr  4 14:39 Makefile.nt
-rw-r--r--   1 angus       4123 Apr  4 14:39 Makefile.os2
-rw-r--r--   1 angus       6370 Apr  4 14:39 Makefile.unix
-rw-r--r--   1 angus      10167 Apr  4 14:39 README
-rw-r--r--   1 angus        585 Apr  4 14:39 config.h
-rw-r--r--   1 angus       2310 Apr  4 14:39 descrip.mms
-rw-r--r--   1 angus       5429 Apr  4 14:39 epsffit.c
-rw-r--r--   1 angus       1210 Apr  4 14:39 epsffit.man
-rw-r--r--   1 angus       1159 Apr  4 14:39 extractres.man
-rw-r--r--   1 angus       2607 Apr  4 14:39 extractres.pl
-rw-r--r--   1 angus        507 Apr  4 14:39 fixdlsrps.man
-rw-r--r--   1 angus       1421 Apr  4 14:39 fixdlsrps.pl
-rw-r--r--   1 angus        473 Apr  4 14:39 fixfmps.man
-rw-r--r--   1 angus        456 Apr  4 14:39 fixfmps.pl
-rw-r--r--   1 angus        587 Apr  4 14:39 fixmacps.man
-rw-r--r--   1 angus       1997 Apr  4 14:39 fixmacps.pl
-rw-r--r--   1 angus        502 Apr  4 14:39 fixpsditps.man
-rw-r--r--   1 angus        551 Apr  4 14:39 fixpsditps.pl
-rw-r--r--   1 angus        469 Apr  4 14:39 fixpspps.man
-rw-r--r--   1 angus       1156 Apr  4 14:39 fixpspps.pl
-rw-r--r--   1 angus        477 Apr  4 14:39 fixscribeps.man
-rw-r--r--   1 angus        336 Apr  4 14:39 fixscribeps.pl
-rw-r--r--   1 angus        499 Apr  4 14:39 fixtpps.man
-rw-r--r--   1 angus        556 Apr  4 14:39 fixtpps.pl
-rw-r--r--   1 angus        493 Apr  4 14:39 fixwfwps.man
-rw-r--r--   1 angus        714 Apr  4 14:39 fixwfwps.pl
-rw-r--r--   1 angus        479 Apr  4 14:39 fixwpps.man
-rw-r--r--   1 angus        589 Apr  4 14:39 fixwpps.pl
-rw-r--r--   1 angus        477 Apr  4 14:39 fixwwps.man
-rw-r--r--   1 angus        284 Apr  4 14:39 fixwwps.pl
-rw-r--r--   1 angus       6124 Apr  4 14:39 getafm
-rw-r--r--   1 angus        711 Apr  4 14:39 getafm.man
-rw-r--r--   1 angus       1035 Apr  4 14:39 includeres.man
-rw-r--r--   1 angus       1312 Apr  4 14:39 includeres.pl
-rw-r--r--   1 angus       1303 Apr  4 14:39 maketext
-rw-r--r--   1 angus      30969 Apr  4 14:39 md68_0.ps
-rw-r--r--   1 angus      35273 Apr  4 14:39 md71_0.ps
-rw-r--r--   1 angus         40 Apr  4 14:39 patchlev.h
-rw-r--r--   1 angus       2598 Apr  4 14:39 psbook.c
-rw-r--r--   1 angus       1084 Apr  4 14:39 psbook.man
-rw-r--r--   1 angus       3013 Apr  4 14:39 pserror.c
-rw-r--r--   1 angus        475 Apr  4 14:39 pserror.h
-rw-r--r--   1 angus        891 Apr  4 14:39 psmerge.man
-rw-r--r--   1 angus       1864 Apr  4 14:39 psmerge.pl
-rw-r--r--   1 angus       9893 Apr  4 14:39 psnup.c
-rw-r--r--   1 angus       3812 Apr  4 14:39 psnup.man
-rw-r--r--   1 angus       5034 Apr  4 14:39 psresize.c
-rw-r--r--   1 angus       1585 Apr  4 14:39 psresize.man
-rw-r--r--   1 angus       5472 Apr  4 14:39 psselect.c
-rw-r--r--   1 angus       1920 Apr  4 14:39 psselect.man
-rw-r--r--   1 angus       7442 Apr  4 14:39 psspec.c
-rw-r--r--   1 angus        803 Apr  4 14:39 psspec.h
-rw-r--r--   1 angus       4795 Apr  4 14:39 pstops.c
-rw-r--r--   1 angus       3895 Apr  4 14:39 pstops.man
-rw-r--r--   1 angus       9064 Apr  4 14:39 psutil.c
-rw-r--r--   1 angus       1376 Apr  4 14:39 psutil.h
-rw-r--r--   1 angus       2567 Apr  4 14:39 showchar

PROGRAMS

psbook          rearranges pages into signatures
psselect        selects pages and page ranges
pstops          performs general page rearrangement and selection
psnup           put multiple pages per physical sheet of paper
psresize        alter document paper size
epsffit         fits an EPSF file to a given bounding box

psselect in modeled after Chris Torek's dviselect program, and pstops is
modeled after Tom Rokicki's dvidvi program. psbook is modeled on my own
dvibook program, which borrows heavily from Chris Torek's dviselect.

SCRIPTS

getafm   (sh)   outputs PostScript to retrieve AFM file from printer
showchar (sh)   outputs PostScript to draw a character with metric info
fixdlsrps (perl) filter to fix DviLaser/PS output so that PSUtils works
fixfmps  (perl) filter to fix framemaker documents so that psselect etc. work
fixmacps (perl) filter to fix Macintosh documents with saner version of md
fixpsditps (perl) filter to fix Transcript psdit documents to work with PSUtils
fixpspps (perl) filter to fix PSPrint PostScript so that psselect etc. work
fixscribeps (perl) filter to fix Scribe PostScript so that psselect etc. work
fixtpps  (perl) filter to fix Troff Tpscript documents
fixwfwps (perl) filter to fix Word for Windows documents for PSUtils
fixwpps  (perl) filter to fix WordPerfect documents for PSUtils
fixwwps  (perl) filter to fix Windows Write documents for PSUtils
extractres (perl) filter to extract resources from PostScript files
includeres (perl) filter to include resources into PostScript files
psmerge (perl) hack script to merge multiple PostScript files

INSTALLATION

UUdecode md71_0.uue and md68_0.uue (if supplied encoded). Copy the most
appropriate makefile to "Makefile", and edit the copy to put in required paths
for BINDIR, SCRIPTDIR, MANDIR, INCLUDEDIR, and PERL. Alter values of MANEXT to
put the manual pages in a different section if desired, change PAPER to set
the default paper size, "make", and "make install".

BUGS

The utilities don't check for PS-Adobe-?.? conformance; they assume documents
conform. Utilities need an extra save/restore around whole document on a
SPARCPrinter with NeWSPrint 1.0, because of bugs in the xnews server.

Bug fixes and suggestions to angus@harlequin.co.uk

UPDATES

The definitive archive site for PSUtils updates is ftp.dcs.ed.ac.uk, in the
directory pub/ajcd/. The latest version will be in psutils.tar.Z, older
versions may also be in psutils-*.tar.Z

NOTE

This is an interim release; these utilities are currently being re-written
from scratch, with a full DSC-3.0 parser and more extraction, merging, and
inclusion options included.

WINDOWS USERS

*Please* make sure that you have selected "Generate DSC Comments" in your
printer driver setup. These utilities need DSC comments to tell where page
boundaries are.

DVIPS USERS

The latest versions of dvips have changed the default setting of the DSC
comment flag; you must generate with DSC comments for PSUtils to work.

ACKNOWLEDGEMENTS

Bug fixes and suggestions for improvements to PSUtils have come from many
people, including:

        Brian Colfer            brianc@labmed.ucsf.edu
        Charles A. Finnell      finnell@org.mitre.lear
        Conrad Kimball          cek@com.boeing.sdc
        J.W.Hawtin              
        Jochen Schwarze         schwarze@de.isa
        Ken Carpenter           khc@edu.ksu.eece
        Kristian Jorg           etxkrjg@se.ericsson.solsta
        Larry Weissman          larryw@nsr.bioeng.washington.edu 
        Michael L. Brown        brown@wi.extrel.com
        Hunter Goatley	        goathunter@wkuvx1.bitnet
        John Interrante         interran@uluru.Stanford.edu
        Maurizio Cremonesi      MAUCREM@imiclvx.earn
        Matthew Stier           Matthew.Stier@East.Sun.com
        Gerry Pratt             cca13@seq1.kl.ac.uk
        Robert Joop             rj@rainbow.in-berlin.de
	Johan Vromans		jv@mh.nl
	Bryan Faubion		bryanf@tc.fluke.com
	Chris Ritson		C.R.Ritson@ncl.ac.uk
	Michele Marziani	MARZIANI@VAXFE.INFN.IT
	Michael I. Schwartz	mschwart@diana.cair.du.edu
	Chris Ritson		C.R.Ritson@newcastle.ac.uk
	Joerg Eisenreich
	Anreas Borchert		borchert@mathematik.uni-ulm.de

(Apologies to anyone who I have left out, it was not intentional.)

NEWS

Patchlevel 11 contains some significant enhancements to PSUtils, in
preparation for the eventual release of version 2 (don't hold your breath
waiting for it). These include:

* Specify paper sizes by name for pstops and psnup.
* Psnup re-written in C to be much more versatile (do any number n-up).
* Epsffit can input broken %%BoundingBox comments which use real numbers.
* Should work on MSDOS and VMS machines as well as Unix.
* Accept more DSC compliant documents (Page labels are better supported).

Patchlevel 12 was a bug-fix release.

* Long standing fixmacps bug fixed.
* fixwfwps fixes WFW EPSF files as well as DSC files.
* md71_0.ps and md68_0.ps files were automatically uudecoded.

Patchlevel 13 contained two new scripts for resource management, and fixes to
the Makefile, page labels, and output chaining.

* Epsffit can output to a file as well as standard output.
* extractres takes resources out of PostScript files and saves them
* includeres puts resources from a resource library into PostScript files.
* maketext script is now used to do substitutions in Perl scripts and man pages
* page labels in psnup and pstops are now show where pages came from.
* page labels in psbook and psselect fixed.
* prologues fixed to be extractable and re-usable
* Makefile doesn't use SUFFIXES any more
* pstops and psnup output can now be chained through each other.
* psresize alters the paper size used by a document
* patchlevel.h shortened to patchlev.h as a concession to MSDOS
* psnup now has -n nup form for compatibility with other n-up programs

Patchlevel 14 has some minor bug fixes.

* psselect can take end-relative page ranges
* Makefiles restructured to generate machine specific versions from one source
* MSDOS, Windows NT and OS/2 support
* corrections to psbook output for empty pages when rearranging pstops output

Patchlevel 15 was a stabilisation release

* All code converted to ANSI C, improved error and warning procedures
* Portability fixes in the Makefiles
* psnup can take different sized input and output pages
* Minor fixes to fixwpps script
* psselect reversed pages fixed
* maketext and fix scripts updated for Perl 5

Patchlevel 16 was a minor bugfix release

* Piped output and input works correctly in NT
