home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-20 | 60.2 KB | 2,193 lines |
- Newsgroups: comp.sources.misc
- From: ajcd@dcs.ed.ac.uk (Angus Duggan)
- Subject: v39i093: psutils - Postscript document manipulation tools, v1.12, Part01/04
- Message-ID: <csm-v39i093=psutils.121749@sparky.Sterling.COM>
- X-Md4-Signature: 2ad8190532bc0362a4c6de99e4f73d5b
- Sender: kent@sparky.sterling.com (Kent Landfield)
- Organization: Sterling Software
- Date: Mon, 20 Sep 1993 17:18:12 GMT
- Approved: kent@sparky.sterling.com
-
- Submitted-by: ajcd@dcs.ed.ac.uk (Angus Duggan)
- Posting-number: Volume 39, Issue 93
- Archive-name: psutils/part01
- Environment: UNIX, VMS, msdos
- Supersedes: psutils: Volume 35, Issue 8-11
-
- PSUtils is a set of 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 5.1 (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 and Decstation 3100 machines under Ultrix
- 4.0.
-
- 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
- epsffit fits an EPSF file to a given bounding box
-
- SCRIPTS
- getafm (sh) outputs PostScript to retrieve AFM file from printer
- showchar (sh) outputs PostScript to draw a character with metric info
- 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
- 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
-
- 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%uucp.vidiot@edu.wisc.cs
- 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
-
- (Apologies to anyone who I have left out.)
-
- NEWS
- There have been 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).
-
- Bug fixes and suggestions to ajcd@dcs.ed.ac.uk
-
- Angus Duggan
- -----------
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 4)."
- # Contents: LICENSE Makefile Manifest README descrip.mms epsffit.man
- # fixfmps.man fixfmps.pl fixmacps.man fixmacps.pl fixpsditps.man
- # fixpsditps.pl fixpspps.man fixpspps.pl fixtpps.man fixtpps.pl
- # fixwfwps.man fixwfwps.pl fixwpps.man fixwpps.pl fixwwps.man
- # fixwwps.pl getafm.man patchlevel.h psbook.c psbook.man psnup.man
- # psselect.man psspec.h pstops.man psutil.h showchar
- # Wrapped by ajcd@fivla on Fri Sep 17 14:10:19 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f LICENSE -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"LICENSE\"
- else
- echo shar: Extracting \"LICENSE\" \(1945 characters\)
- sed "s/^X//" >LICENSE <<'END_OF_LICENSE'
- X
- X PS Utilities Package
- X
- XThe constituent files of this package listed below are copyright (C) 1991,
- X1992, 1993 Angus J. C. Duggan.
- X
- XLICENSE Makefile Manifest README epsffit.c
- Xepsffit.man fixfmps.man fixfmps.pl fixmacps.man fixmacps.pl
- Xfixpsditps.man fixpsditps.pl fixpspps.man fixpspps.pl fixtpps.man
- Xfixtpps.pl fixwfwps.man fixwfwps.pl fixwpps.man fixwpps.pl
- Xfixwwps.man fixwwps.pl getafm.man patchlevel.h psbook.c
- Xpsbook.man psnup.c psnup.man psselect.c psselect.man
- Xpsspec.c psspec.h pstops.c pstops.man psutil.c
- Xpsutil.h showchar
- X
- XThey may be copied and used for any purpose (including distribution as part of
- Xa for-profit product), provided:
- X
- X1) The original attribution of the programs is clearly displayed in the product
- X and/or documentation, even if the programs are modified and/or renamed as
- X part of the product.
- X
- X2) The original source code of the programs is provided free of charge (except
- X for reasonable distribution costs). For a definition of reasonable
- X distribution costs, see the Gnu General Public License or Larry Wall's
- X Artistic License (provided with the Perl 4 kit). The GPL and Artistic
- X License in NO WAY affect this license; they are merely used as examples of
- X the spirit in which it is intended.
- X
- X3) These programs are provided "as-is". No warranty or guarantee of their
- X fitness for any particular task is provided. Use of these programs is
- X completely at your own risk.
- X
- XBasically, I don't mind how you use the programs so long as you acknowledge
- Xthe author, and give people the originals if they want them.
- X
- XThe included files, md68_0.ps and md71_0.ps (and their uuencoded forms) are
- X(to the best of my knowledge) copyright Apple Computer, Inc.
- X
- X AJCD 7/6/93
- END_OF_LICENSE
- if test 1945 -ne `wc -c <LICENSE`; then
- echo shar: \"LICENSE\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f Makefile -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"Makefile\"
- else
- echo shar: Extracting \"Makefile\" \(4034 characters\)
- sed "s/^X//" >Makefile <<'END_OF_Makefile'
- X# Makefile for PS utilities
- X
- XBINMODE=0755
- XMANMODE=0644
- XCHMOD=chmod
- XINSTALL=install -c -m $(BINMODE)
- XINSTALLMAN=install -c -m $(MANMODE)
- XBINDIR=/usr/local/bin
- XSCRIPTDIR=$(BINDIR)
- XMANDIR=/usr/local/share/man/man1
- XMANEXT=1
- XPAPER=a4
- XINCLUDEDIR=/usr/local/share/tex/dvips
- XPERL=/usr/local/bin/perl
- X
- X# CFLAGS variable controls compilation. Add following flags if necessary:
- X# -DVMS if compiling under VMS
- X# -DMSDOS if compiling under MSDOS
- XCFLAGS=-g -DPAPER=\"$(PAPER)\"
- X
- X# epsffit fits an epsf file to a given bounding box
- X# psbook rearranges pages into signatures
- X# psselect selects page ranges
- X# pstops performs general page rearrangement and merging
- X# psnup puts multiple logical pages on one physical page
- X
- X# definitions for Unix
- Xexe =
- Xobj = .o
- XBIN = psbook psselect pstops epsffit psnup
- XSHELLSCRIPTS = getafm
- XPERLSCRIPTS = fixfmps fixmacps fixpsditps fixpspps fixtpps fixwfwps fixwpps \
- X fixwwps
- XINCLUDES = md68_0.ps md71_0.ps
- XMANPAGES = psbook.$(MANEXT) psselect.$(MANEXT) pstops.$(MANEXT) \
- X epsffit.$(MANEXT) psnup.$(MANEXT) getafm.$(MANEXT) \
- X fixfmps.$(MANEXT) fixmacps.$(MANEXT) fixpsditps.$(MANEXT) \
- X fixpspps.$(MANEXT) fixtpps.$(MANEXT) fixwfwps.$(MANEXT) \
- X fixwpps.$(MANEXT) fixwwps.$(MANEXT)
- XRM = rm -f
- X
- X# Definitions for MSDOS
- X#exe = .exe
- X#obj = .obj
- X#BIN = psbook$(exe) psselect$(exe) pstops$(exe) epsffit$(exe) psnup$(exe)
- X#PERLSCRIPTS =
- X#INCLUDES =
- X#MANPAGES =
- X#RM = del
- X
- X.SUFFIXES: .man .$(MANEXT)
- X
- X.man.$(MANEXT):
- X R=`sed -n "s/.*RELEASE *//p" patchlevel.h`; \
- X P=`sed -n "s/.*PATCHLEVEL *//p" patchlevel.h`; \
- X M=`echo $(MANPAGES) | sed -e "s/\.$(MANEXT)/($(MANEXT)),/g" -e "s/, *$$//"`; \
- X sed -e "s/@PL@/$$P/" -e "s/@REL@/$$R/" -e "s/@MAN@/$$M/" \
- X -e "s/@PAPER@/$(PAPER)/" $< >$@
- X
- Xall: $(BIN) $(PERLSCRIPTS) $(MANPAGES)
- X
- Xepsffit$(exe): epsffit.c
- X $(CC) $(CFLAGS) -o epsffit$(exe) epsffit.c
- X
- Xpsnup$(exe): psnup$(obj) psutil$(obj) psspec$(obj)
- X $(CC) $(CFLAGS) -o psnup$(exe) psutil$(obj) psspec$(obj) psnup$(obj)
- X
- Xpsbook$(exe): psbook$(obj) psutil$(obj)
- X $(CC) $(CFLAGS) -o psbook$(exe) psutil$(obj) psbook$(obj)
- X
- Xpsselect$(exe): psselect$(obj) psutil$(obj)
- X $(CC) $(CFLAGS) -o psselect$(exe) psutil$(obj) psselect$(obj)
- X
- Xpstops$(exe): pstops$(obj) psutil$(obj) psspec$(obj)
- X $(CC) $(CFLAGS) -o pstops$(exe) psutil$(obj) psspec$(obj) pstops$(obj)
- X
- Xpsnup$(obj): psutil.h patchlevel.h psspec.h psnup.c
- X
- Xpsbook$(obj): psutil.h patchlevel.h psbook.c
- X
- Xpstops$(obj): psutil.h patchlevel.h psspec.h pstops.c
- X
- Xpsselect$(obj): psutil.h patchlevel.h psselect.c
- X
- Xpsutil$(obj): psutil.h patchlevel.h psutil.c
- X
- Xpsspec$(obj): psutil.h patchlevel.h psspec.h psspec.c
- X
- Xfixfmps: fixfmps.pl
- X sed -e "s%@PERL@%$(PERL)%" $? >$@; \
- X $(CHMOD) $(BINMODE) $@
- X
- Xfixmacps: fixmacps.pl
- X sed -e "s%@PERL@%$(PERL)%" \
- X -e "s%@INCLUDE@%$(INCLUDEDIR)%" $? >$@; \
- X $(CHMOD) $(BINMODE) $@
- X
- Xfixpsditps: fixpsditps.pl
- X sed -e "s%@PERL@%$(PERL)%" $? >$@; \
- X $(CHMOD) $(BINMODE) $@
- X
- Xfixpspps: fixpspps.pl
- X sed -e "s%@PERL@%$(PERL)%" $? >$@; \
- X $(CHMOD) $(BINMODE) $@
- X
- Xfixtpps: fixtpps.pl
- X sed -e "s%@PERL@%$(PERL)%" $? >$@; \
- X $(CHMOD) $(BINMODE) $@
- X
- Xfixwfwps: fixwfwps.pl
- X sed -e "s%@PERL@%$(PERL)%" $? >$@; \
- X $(CHMOD) $(BINMODE) $@
- X
- Xfixwpps: fixwpps.pl
- X sed -e "s%@PERL@%$(PERL)%" $? >$@; \
- X $(CHMOD) $(BINMODE) $@
- X
- Xfixwwps: fixwwps.pl
- X sed -e "s%@PERL@%$(PERL)%" $? >$@; \
- X $(CHMOD) $(BINMODE) $@
- X
- Xclean:
- X $(RM) *$(obj)
- X
- Xveryclean realclean: clean
- X $(RM) $(BIN) $(PERLSCRIPTS) $(MANPAGES)
- X
- Xinstall: install.bin install.script install.man install.include
- X
- Xinstall.bin: $(BIN)
- X @for i in $(BIN); do \
- X echo Installing $$i; \
- X $(INSTALL) $$i $(BINDIR); \
- X done
- X
- Xinstall.script: $(PERLSCRIPTS) $(SHELLSCRIPTS)
- X @for i in $(PERLSCRIPTS) $(SHELLSCRIPTS); do \
- X echo Installing $$i; \
- X $(INSTALL) $$i $(SCRIPTDIR); \
- X done
- X
- Xinstall.include: $(INCLUDES)
- X @for i in $(INCLUDES); do \
- X echo Installing $$i; \
- X $(INSTALLMAN) $$i $(INCLUDEDIR); \
- X done
- X
- Xinstall.man: $(MANPAGES)
- X @for i in $(MANPAGES); do \
- X echo Installing manual page for $$i; \
- X $(INSTALLMAN) $$i $(MANDIR)/$$i; \
- X done
- X
- END_OF_Makefile
- if test 4034 -ne `wc -c <Makefile`; then
- echo shar: \"Makefile\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f Manifest -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"Manifest\"
- else
- echo shar: Extracting \"Manifest\" \(443 characters\)
- sed "s/^X//" >Manifest <<'END_OF_Manifest'
- XLICENSE
- XMakefile
- XManifest
- XREADME
- Xdescrip.mms
- Xepsffit.c
- Xepsffit.man
- Xfixfmps.man
- Xfixfmps.pl
- Xfixmacps.man
- Xfixmacps.pl
- Xfixpsditps.man
- Xfixpsditps.pl
- Xfixpspps.man
- Xfixpspps.pl
- Xfixtpps.man
- Xfixtpps.pl
- Xfixwfwps.man
- Xfixwfwps.pl
- Xfixwpps.man
- Xfixwpps.pl
- Xfixwwps.man
- Xfixwwps.pl
- Xgetafm
- Xgetafm.man
- Xmd68_0.uue
- Xmd71_0.uue
- Xpatchlevel.h
- Xpsbook.c
- Xpsbook.man
- Xpsnup.c
- Xpsnup.man
- Xpsselect.c
- Xpsselect.man
- Xpsspec.c
- Xpsspec.h
- Xpstops.c
- Xpstops.man
- Xpsutil.c
- Xpsutil.h
- Xshowchar
- END_OF_Manifest
- if test 443 -ne `wc -c <Manifest`; then
- echo shar: \"Manifest\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f README -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"README\"
- else
- echo shar: Extracting \"README\" \(6316 characters\)
- sed "s/^X//" >README <<'END_OF_README'
- XPostScript Utilities Angus Duggan 7 June 1993
- X
- XThis shar file contains some utilities for manipulating PostScript documents.
- XPage selection and rearrangement are supported, including arrangement into
- Xsignatures for booklet printing, and page merging for n-up printing.
- X
- XENVIRONMENT
- X
- XThese utilities have been compiled and run on Sun-3 and Sun-4 machines under
- XSunOS 5.1 (Solaris 2.1), 4.1.3, 4.1.2, 4.1.1 and 4.0.1, HP9000/375 machines
- Xunder HPUX 7.0 and HPUX 8.0, Sequent Symmetry machines under Dynix 3.1.4
- Xand PTX 3.2.0, IBM RS/6000, VAX/VMS and Decstation 3100 machines under Ultrix
- X4.0.
- X
- XFILES
- X
- XThe files contained are:
- X-rw-r--r-- 1 ajcd 1945 Jun 7 15:40 LICENSE
- X-rw-r--r-- 1 ajcd 3367 Jun 7 11:30 Makefile
- X-rw-r--r-- 1 ajcd 432 Jun 7 11:33 Manifest
- X-rw-r--r-- 1 ajcd 6295 Jun 7 15:40 README
- X-rw-r--r-- 1 ajcd 1864 Jun 5 16:31 descrip.mms
- X-rw-r--r-- 1 ajcd 4431 Jun 5 11:05 epsffit.c
- X-rw-r--r-- 1 ajcd 1045 Jun 7 11:01 epsffit.man
- X-rw-r--r-- 1 ajcd 538 Apr 9 22:33 fixfmps.man
- X-rw-r--r-- 1 ajcd 419 Apr 9 17:14 fixfmps.pl
- X-rw-r--r-- 1 ajcd 559 Apr 9 22:35 fixmacps.man
- X-rw-r--r-- 1 ajcd 1751 Jun 7 11:30 fixmacps.pl
- X-rw-r--r-- 1 ajcd 564 Apr 9 22:35 fixpsditps.man
- X-rw-r--r-- 1 ajcd 596 Apr 9 17:15 fixpsditps.pl
- X-rw-r--r-- 1 ajcd 533 Apr 9 22:35 fixpspps.man
- X-rw-r--r-- 1 ajcd 1236 Apr 9 17:15 fixpspps.pl
- X-rw-r--r-- 1 ajcd 551 Apr 9 22:32 fixtpps.man
- X-rw-r--r-- 1 ajcd 602 Apr 9 22:31 fixtpps.pl
- X-rw-r--r-- 1 ajcd 556 Apr 9 22:36 fixwfwps.man
- X-rw-r--r-- 1 ajcd 318 Apr 9 17:15 fixwfwps.pl
- X-rw-r--r-- 1 ajcd 544 Apr 9 22:36 fixwpps.man
- X-rw-r--r-- 1 ajcd 669 May 5 13:54 fixwpps.pl
- X-rw-r--r-- 1 ajcd 542 Apr 22 12:38 fixwwps.man
- X-rw-r--r-- 1 ajcd 364 Apr 22 12:37 fixwwps.pl
- X-rwxr-xr-x 1 ajcd 6124 Jun 7 15:25 getafm
- X-rw-r--r-- 1 ajcd 702 Jun 7 15:38 getafm.man
- X-rw-r--r-- 1 ajcd 42798 May 6 09:16 md68_0.uue
- X-rw-r--r-- 1 ajcd 48726 May 6 09:16 md71_0.uue
- X-rw-r--r-- 1 ajcd 40 Apr 9 21:03 patchlevel.h
- X-rw-r--r-- 1 ajcd 2155 Jun 4 15:23 psbook.c
- X-rw-r--r-- 1 ajcd 1059 Mar 31 15:33 psbook.man
- X-rw-r--r-- 1 ajcd 6967 Jun 7 10:29 psnup.c
- X-rw-r--r-- 1 ajcd 2578 Jun 7 11:28 psnup.man
- X-rw-r--r-- 1 ajcd 5298 Jun 4 15:24 psselect.c
- X-rw-r--r-- 1 ajcd 1893 Mar 31 15:33 psselect.man
- X-rw-r--r-- 1 ajcd 6682 Jun 5 16:49 psspec.c
- X-rw-r--r-- 1 ajcd 604 Jun 5 13:38 psspec.h
- X-rw-r--r-- 1 ajcd 4215 Jun 5 13:04 pstops.c
- X-rw-r--r-- 1 ajcd 3512 Jun 7 10:43 pstops.man
- X-rw-r--r-- 1 ajcd 8195 Jun 5 16:43 psutil.c
- X-rw-r--r-- 1 ajcd 988 Jun 5 14:48 psutil.h
- X-rwxr-xr-x 1 ajcd 2552 Feb 10 12:47 showchar
- X
- XPROGRAMS
- X
- Xpsbook rearranges pages into signatures
- Xpsselect selects pages and page ranges
- Xpstops performs general page rearrangement and selection
- Xpsnup put multiple pages per physical sheet of paper
- Xepsffit fits an EPSF file to a given bounding box
- X
- Xpsselect in modeled after Chris Torek's dviselect program, and pstops is
- Xmodeled after Tom Rokicki's dvidvi program. psbook is modeled on my own
- Xdvibook program, which borrows heavily from Chris Torek's dviselect.
- X
- XSCRIPTS
- X
- Xgetafm (sh) outputs PostScript to retrieve AFM file from printer
- Xshowchar (sh) outputs PostScript to draw a character with metric info
- Xfixfmps (perl) filter to fix framemaker documents so that psselect etc. work
- Xfixmacps (perl) filter to fix Macintosh documents with saner version of md
- Xfixpsditps (perl) filter to fix Transcript psdit documents to work with PSUtils
- Xfixpspps (perl) filter to fix PSPrint PostScript so that psselect etc. work
- Xfixtpps (perl) filter to fix Troff Tpscript documents
- Xfixwfwps (perl) filter to fix Word for Windows documents for PSUtils
- Xfixwpps (perl) filter to fix WordPerfect documents for PSUtils
- Xfixwwps (perl) filter to fix Windows Write documents for PSUtils
- X
- XINSTALLATION
- X
- XUUdecode md71_0.uue and md68_0.uue (if supplied encoded), edit Makefile to put
- Xin required paths and CFLAGS (-DSYSV for System V machines, -DMSDOS for
- XMessy-DOS, -DVMS for VMS), "make", and "make install".
- X
- XBUGS
- X
- XThe utilities don't check for PS-Adobe-?.? conformance; they assume documents
- Xconform. Utilities need an extra save/restore around whole document on a
- XSPARCPrinter with NeWSPrint 1.0, because of bugs in the xnews server.
- X
- XBug fixes and suggestions to ajcd@dcs.ed.ac.uk
- X
- XNOTE
- X
- XThis is an interim release; these utilities are currently being re-written
- Xfrom scratch, with a full DSC-3.0 parser and more extraction, merging, and
- Xinclusion options included.
- X
- XACKNOWLEDGEMENTS
- X
- XBug fixes and suggestions for improvements to PSUtils have come from many
- Xpeople, including:
- X
- X Brian Colfer brianc@labmed.ucsf.edu
- X Charles A. Finnell finnell@org.mitre.lear
- X Conrad Kimball cek@com.boeing.sdc
- X J.W.Hawtin
- X Jochen Schwarze schwarze@de.isa
- X Ken Carpenter khc@edu.ksu.eece
- X Kristian Jorg etxkrjg@se.ericsson.solsta
- X Larry Weissman larryw@nsr.bioeng.washington.edu
- X Michael L. Brown brown%uucp.vidiot@edu.wisc.cs
- X Hunter Goatley goathunter@wkuvx1.bitnet
- X John Interrante interran@uluru.Stanford.edu
- X Maurizio Cremonesi MAUCREM@imiclvx.earn
- X Matthew Stier Matthew.Stier@East.Sun.com
- X Gerry Pratt cca13@seq1.kl.ac.uk
- X Robert Joop rj@rainbow.in-berlin.de
- X
- X(Apologies to anyone who I have left out.)
- X
- XNEWS
- X
- XPatchlevel 11 contains some significant enhancements to PSUtils, in
- Xpreparation for the eventual release of version 2 (don't hold your breath
- Xwaiting for it). These include:
- X
- X* Specify paper sizes by name for pstops and psnup.
- X* Psnup re-written in C to be much more versatile (do any number n-up).
- X* Epsffit can input broken %%BoundingBox comments which use real numbers.
- X* Should work on MSDOS and VMS machines as well as Unix.
- X* Accept more DSC compliant documents (Page labels are better supported).
- END_OF_README
- if test 6316 -ne `wc -c <README`; then
- echo shar: \"README\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f descrip.mms -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"descrip.mms\"
- else
- echo shar: Extracting \"descrip.mms\" \(1863 characters\)
- sed "s/^X//" >descrip.mms <<'END_OF_descrip.mms'
- X#
- X# VMS MMS build file for PS utilities
- X#
- X# Hunter Goatley, 16-MAR-1993 14:47
- X#
- XCFLAGS = /NOLIST/OBJECT=$(MMS$TARGET)
- XLFLAGS = /NOTRACE/EXEC=$(MMS$TARGET)
- X
- X.IFDEF __ALPHA__ #If building with Alpha cross-compilers, OBJ
- XOPTIONS_FILE = #... is defined already
- XLINKOPT =
- XCFLAGS = /NOLIST/OBJECT=$(MMS$TARGET)/STANDARD=VAXC
- X.ELSE
- XOBJ = .OBJ
- XEXE = .EXE
- XOPTIONS_FILE = ,VAXC.OPT
- XLINKOPT = $(options_file)/OPTIONS
- X.ENDIF
- X
- X# epsffit fits an epsf file to a given bounding box
- X# psbook rearranges pages into signatures
- X# psselect selects page ranges
- X# pstops performs general page rearrangement and merging
- X# psnup puts multiple logical pages on one physical page
- X
- Xall : psbook$(exe), psselect$(exe), pstops$(exe), epsffit$(exe), psnup$(exe)
- X @ write sys$output "PSUTILS build complete"
- X
- Xepsffit$(exe) : epsffit$(obj)$(options_file)
- X $(LINK)$(LFLAGS) $(MMS$SOURCE)$(linkopt)
- X
- Xpsnup$(exe) : psnup$(obj), psutil$(obj), psspec$(obj)
- X $(LINK)$(LFLAGS) psnup$(obj),psutil$(obj),psspec$(obj)$(linkopt)
- X
- Xpsbook$(exe) : psbook$(obj), psutil$(obj)$(options_file)
- X $(LINK)$(LFLAGS) psbook$(obj),psutil$(obj)$(linkopt)
- X
- Xpsselect$(exe) : psselect$(obj), psutil$(obj)
- X $(LINK)$(LFLAGS) psselect$(obj),psutil$(obj)$(linkopt)
- X
- Xpstops$(exe) : pstops$(obj), psutil$(obj), psspec$(obj)
- X $(LINK)$(LFLAGS) pstops$(obj),psutil$(obj),psspec$(obj)$(linkopt)
- X
- Xpsnup$(obj) : psnup.c, psutil.h patchlevel.h psspec.h
- X
- Xpsbook$(obj) : psbook.c, psutil.h patchlevel.h
- X
- Xpstops$(obj) : pstops.c, psutil.h patchlevel.h psspec.h
- X
- Xpsutil$(obj) : psutil.c, psutil.h patchlevel.h
- X
- Xpsselect$(obj) : psselect.c, psutil.h patchlevel.h
- X
- Xpsspec$(obj) : psspec.c, psutil.h patchlevel.h psspec.h
- X
- Xclean :
- X delete/log *$(obj);*,psnup$(exe);*,psbook$(exe);*,-
- X psselect$(exe);*,pstops$(exe);*,epsffit$(exe);*
- X
- X
- END_OF_descrip.mms
- if test 1863 -ne `wc -c <descrip.mms`; then
- echo shar: \"descrip.mms\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f epsffit.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"epsffit.man\"
- else
- echo shar: Extracting \"epsffit.man\" \(1165 characters\)
- sed "s/^X//" >epsffit.man <<'END_OF_epsffit.man'
- X.TH EPSFFIT 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xepsffit \- fit encapsulated PostScript file (EPSF) into constrained size
- X.SH SYNOPSIS
- X.B epsffit
- X[
- X.B \-c
- X] [
- X.B \-r
- X] [
- X.B \-a
- X] [
- X.B \-m
- X] [
- X.B \-s
- X]
- X.I "llx lly urx ury"
- X[
- X.B file
- X]
- X.SH DESCRIPTION
- X.I Epsffit
- Xfits an EPSF file (encapsulated PostScript) to a given bounding box.
- XThe coordinates of the box are given by \fB(llx,lly)\fR for the lower
- Xleft, and \fB(urx,ury)\fR for the upper right, in PostScript units (points).
- X.PP
- XIf no file is specified,
- X.I epsffit
- Xuses the standard input. Output is always to the standard output.
- X.SH OPTIONS
- X.IP \fB\-c\fP 1i
- XCenter the image in the given bounding box.
- X.IP \fB\-r\fP 1i
- XRotate the image by 90 degrees counter-clockwise.
- X.IP \fB\-a\fP 1i
- XAdjust the aspect ratio to fit the bounding box. The default is to preserve
- Xthe aspect ratio.
- X.IP \fB\-m\fP 1i
- XRotates the image to maximise the size if it would fit the specified bounding
- Xbox better.
- X.IP \fB\-s\fP 1i
- XAdd a \fIshowpage\fP at the end of the file to force the image to print.
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- END_OF_epsffit.man
- if test 1165 -ne `wc -c <epsffit.man`; then
- echo shar: \"epsffit.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixfmps.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixfmps.man\"
- else
- echo shar: Extracting \"fixfmps.man\" \(461 characters\)
- sed "s/^X//" >fixfmps.man <<'END_OF_fixfmps.man'
- X.TH FIXFMPS 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xfixfmps \- filter to fix Framemaker documents so PSUtils work
- X.SH SYNOPSIS
- X.B fixfmps
- X<
- X.I Framemaker.ps
- X>
- X.I Fixed.ps
- X.SH DESCRIPTION
- X.I Fixfmps
- Xis a
- X.I perl
- Xfilter which "fixes" PostScript from Framemaker so
- Xthat it works correctly with Angus Duggan's
- X.B psutils
- Xpackage.
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- END_OF_fixfmps.man
- if test 461 -ne `wc -c <fixfmps.man`; then
- echo shar: \"fixfmps.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixfmps.pl -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixfmps.pl\"
- else
- echo shar: Extracting \"fixfmps.pl\" \(419 characters\)
- sed "s/^X//" >fixfmps.pl <<'END_OF_fixfmps.pl'
- X#!@PERL@
- X# fixfmps: get conforming PostScript out of FrameMaker file
- X# move all FMDEFINEFONTs to start of pages
- X
- X# feed this into perl
- Xeval 'exec perl -S $0 "$@"'
- X if $running_under_some_shell;
- X
- X%fonts=();
- X
- Xwhile (<>) {
- X if (/^([0-9]+) [0-9]+ .* FMDEFINEFONT$/) {
- X $fonts{$1} = $_;
- X } elsif (/^[0-9]+ [0-9]+ [0-9]+ FMBEGINPAGE$/) {
- X print $_, join('',values(%fonts));
- X } else {
- X print $_;
- X }
- X}
- END_OF_fixfmps.pl
- if test 419 -ne `wc -c <fixfmps.pl`; then
- echo shar: \"fixfmps.pl\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixmacps.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixmacps.man\"
- else
- echo shar: Extracting \"fixmacps.man\" \(483 characters\)
- sed "s/^X//" >fixmacps.man <<'END_OF_fixmacps.man'
- X.TH FIXMACPS 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xfixmacps \- filter to fix Macintosh documents with saner version of md
- X.SH SYNOPSIS
- X.B fixmacps
- X<
- X.I Macintosh.ps
- X>
- X.I Fixed.ps
- X.SH DESCRIPTION
- X.I Fixmacps
- Xis a
- X.I perl
- Xfilter which "fixes" PostScript generated from a Macintosh PC
- Xthat it works correctly with Angus Duggan's
- X.B psutils
- Xpackage.
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- END_OF_fixmacps.man
- if test 483 -ne `wc -c <fixmacps.man`; then
- echo shar: \"fixmacps.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixmacps.pl -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixmacps.pl\"
- else
- echo shar: Extracting \"fixmacps.pl\" \(1754 characters\)
- sed "s/^X//" >fixmacps.pl <<'END_OF_fixmacps.pl'
- X#!@PERL@
- X# fixmacps: swap to sanitised appledict
- X
- X# feed this into perl
- Xeval 'exec perl -S $0 "$@"'
- X if $running_under_some_shell;
- X
- X$line = 0; # keep line count
- X$dir = "@INCLUDE@";
- X$prefix = "md";
- X$default = "md71_0.ps";
- X
- Xwhile ($_ = shift(@ARGV)) {
- X if (/^-d(ir)?$/) { $dir = shift(@ARGV); }
- X elsif (/^-n(ame)?$/) { $prefix = shift(@ARGV); }
- X else {
- X unshift(@ARGV, $_);
- X last;
- X }
- X}
- X
- X%fonts = ();
- X$nesting = 0;
- X
- Xwhile (<>) {
- X if (/^%!/) {
- X if (! $line) {
- X print;
- X }
- X } elsif (/^%%BeginProcSet: "?\(AppleDict md\)"? ([0-9]+) ([0-9]+)$/) {
- X local($mdv, $mdr) = ($1, $2);
- X if (open(SANE, "<$dir/$prefix${mdv}_$mdr.ps") ||
- X open(SANE, "<$dir/$default")) {
- X $sane = <SANE>;
- X local($snv, $snr) =
- X $sane =~ /^%%BeginProcSet: \(AppleDict md\) ([0-9]+) ([0-9]+)$/;
- X if ($mdv == $snv && $mdr == $snr) {
- X $ignore = 1;
- X } else {
- X print STDERR "Unrecognised AppleDict version $mdv $mdr\n";
- X print "%!\n" if !$line;
- X print;
- X }
- X } else {
- X print STDERR "Can't find sanitised AppleDict\n";
- X print "%!\n" if !$line;
- X print;
- X }
- X } elsif (/^%%EndProcSet/) {
- X if ($ignore) {
- X $ignore = 0;
- X print "%!\n" if !$line;
- X print $sane;
- X while(<SANE>) {
- X print;
- X }
- X close(SANE);
- X } else {
- X print "%!\n" if !$line;
- X print;
- X }
- X } elsif (/^%%Page:/ && $nesting == 0) {
- X print $_;
- X print values(%fonts);
- X } elsif (/^%%BeginDocument/ || /^%%BeginBinary/) {
- X print $_;
- X $nesting++;
- X } elsif (/^%%EndDocument/ || /^%%EndBinary/) {
- X print $_;
- X $nesting--;
- X } else {
- X if (! $ignore) {
- X if (/^\{\}mark .*rf$/) {
- X $fonts{$_} = $_;
- X print;
- X } else {
- X print "%!\n" if !$line;
- X print;
- X }
- X }
- X }
- X $line++;
- X}
- END_OF_fixmacps.pl
- if test 1754 -ne `wc -c <fixmacps.pl`; then
- echo shar: \"fixmacps.pl\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixpsditps.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixpsditps.man\"
- else
- echo shar: Extracting \"fixpsditps.man\" \(490 characters\)
- sed "s/^X//" >fixpsditps.man <<'END_OF_fixpsditps.man'
- X.TH FIXPSDITPS 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xfixpsditps \- filter to fix Transcript psdit documents so PSUtils work
- X.SH SYNOPSIS
- X.B fixpsditps
- X<
- X.I psdit.ps
- X>
- X.I Fixed.ps
- X.SH DESCRIPTION
- X.I Fixpsditps
- Xis a
- X.I perl
- Xfilter which "fixes" PostScript from Transcript's psdit program so
- Xthat it works correctly with Angus Duggan's
- X.B psutils
- Xpackage.
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- END_OF_fixpsditps.man
- if test 490 -ne `wc -c <fixpsditps.man`; then
- echo shar: \"fixpsditps.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixpsditps.pl -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixpsditps.pl\"
- else
- echo shar: Extracting \"fixpsditps.pl\" \(596 characters\)
- sed "s/^X//" >fixpsditps.pl <<'END_OF_fixpsditps.pl'
- X#!@PERL@
- X# fixpsditps: fix psdit output for use in psutils
- X
- X# feed this into perl
- Xeval 'exec perl -S $0 "$@"'
- X if $running_under_some_shell;
- X
- X$nesting = 0;
- X
- Xwhile (<>) {
- X if (/^\/p{pop showpage pagesave restore \/pagesave save def}def$/) {
- X print "/p{pop showpage pagesave restore}def\n";
- X } elsif (/^%%BeginDocument/ || /^%%BeginBinary/) {
- X print $_;
- X $nesting++;
- X } elsif (/^%%EndDocument/ || /^%%EndBinary/) {
- X print $_;
- X $nesting--;
- X } elsif (/^%%Page:/ && $nesting == 0) {
- X print $_;
- X print "xi\n";
- X } elsif (! /^xi$/) {
- X print $_;
- X }
- X}
- END_OF_fixpsditps.pl
- if test 596 -ne `wc -c <fixpsditps.pl`; then
- echo shar: \"fixpsditps.pl\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixpspps.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixpspps.man\"
- else
- echo shar: Extracting \"fixpspps.man\" \(457 characters\)
- sed "s/^X//" >fixpspps.man <<'END_OF_fixpspps.man'
- X.TH FIXPSPPS 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xfixpspps \- filter to fix PSPrint PostScript so PSUtils work
- X.SH SYNOPSIS
- X.B fixpspps
- X<
- X.I PSPrint.ps
- X>
- X.I Fixed.ps
- X.SH DESCRIPTION
- X.I Fixpspps
- Xis a
- X.I perl
- Xfilter which "fixes" PostScript from PSPrint so
- Xthat it works correctly with Angus Duggan's
- X.B psutils
- Xpackage.
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- END_OF_fixpspps.man
- if test 457 -ne `wc -c <fixpspps.man`; then
- echo shar: \"fixpspps.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixpspps.pl -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixpspps.pl\"
- else
- echo shar: Extracting \"fixpspps.pl\" \(1236 characters\)
- sed "s/^X//" >fixpspps.pl <<'END_OF_fixpspps.pl'
- X#!@PERL@
- X# mangle PostScript produced by PSPrint to make it almost conforming
- X
- X# feed this into perl
- Xeval 'exec perl -S $0 "$@"'
- X if $running_under_some_shell;
- X
- X$header = 1; $ignore = 0;
- X$verbose = 0;
- X@body = ();
- X%fonts = (); $font = "";
- X$inchar = 0; @char = ();
- X
- Xwhile (<>) {
- X if (/^@end$/) {
- X $ignore = 1;
- X } elsif (/^[0-9]+ @bop0$/) {
- X $ignore = 0;
- X $header = 1;
- X } elsif ($header) {
- X if (/^\/([a-z.0-9]+) @newfont$/) {
- X if (! defined($fonts{$1})) {
- X $fonts{$1} = 1;
- X print;
- X } elsif ($verbose) {
- X print STDERR "$font already defined\n";
- X }
- X } elsif (/^([a-z.0-9]+) sf$/) {
- X $font = $1;
- X print;
- X } elsif (/^\[</) {
- X $inchar = 1;
- X push (@char, $_);
- X } elsif ($inchar) {
- X push (@char, $_);
- X if (/.*\] ([0-9]+) dc$/) {
- X if (! defined($fonts{$font,$1})) {
- X $fonts{$font,$1} = 1;
- X print (@char);
- X } elsif ($verbose) {
- X print STDERR "$font character $1 already defined\n";
- X }
- X $inchar = 0;
- X @char = ();
- X }
- X } elsif (/^([0-9]+) @bop1$/) {
- X $header = 0;
- X push (@body, "%%Page: ? $1\n");
- X push (@body, $_);
- X } else {
- X print;
- X }
- X } elsif (! $ignore) {
- X push (@body, $_);
- X }
- X}
- Xprint (@body);
- Xprint ("@end\n");
- END_OF_fixpspps.pl
- if test 1236 -ne `wc -c <fixpspps.pl`; then
- echo shar: \"fixpspps.pl\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixtpps.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixtpps.man\"
- else
- echo shar: Extracting \"fixtpps.man\" \(487 characters\)
- sed "s/^X//" >fixtpps.man <<'END_OF_fixtpps.man'
- X.TH FIXTPPS 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xfixtpps \- filter to fix Tpscript documents to work with PSUtils
- X.SH SYNOPSIS
- X.B fixtpps
- X<
- X.I Tpscript.ps
- X>
- X.I Fixed.ps
- X.SH DESCRIPTION
- X.I Fixtpps
- Xis a
- X.I perl
- Xfilter which "fixes" PostScript generated from the Troff Tpscript driver so
- Xthat it works correctly with Angus Duggan's
- X.B psutils
- Xpackage.
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- END_OF_fixtpps.man
- if test 487 -ne `wc -c <fixtpps.man`; then
- echo shar: \"fixtpps.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixtpps.pl -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixtpps.pl\"
- else
- echo shar: Extracting \"fixtpps.pl\" \(602 characters\)
- sed "s/^X//" >fixtpps.pl <<'END_OF_fixtpps.pl'
- X#!@PERL@
- X# fixtpps: fix tpscript document to work with PSUtils
- X
- X# feed this into perl
- Xeval 'exec perl -S $0 "$@"'
- X if $running_under_some_shell;
- X
- X$nesting = 0;
- X$header = 1;
- X
- Xwhile (<>) {
- X if (/^%%Page:/ && $nesting == 0) {
- X print $_;
- X print "save home\n";
- X $header = 0;
- X } elsif (/^%%BeginDocument/ || /^%%BeginBinary/) {
- X print $_;
- X $nesting++;
- X } elsif (/^%%EndDocument/ || /^%%EndBinary/) {
- X print $_;
- X $nesting--;
- X } elsif (/save home/) {
- X s/save home//;
- X print $_;
- X } elsif (!$header || (! /^save$/ && ! /^home$/)) {
- X print $_;
- X }
- X}
- END_OF_fixtpps.pl
- if test 602 -ne `wc -c <fixtpps.pl`; then
- echo shar: \"fixtpps.pl\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixwfwps.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixwfwps.man\"
- else
- echo shar: Extracting \"fixwfwps.man\" \(481 characters\)
- sed "s/^X//" >fixwfwps.man <<'END_OF_fixwfwps.man'
- X.TH FIXWFWPS 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xfixwfwps \- filter to fix Word for Windows documents so PSUtils work
- X.SH SYNOPSIS
- X.B fixwfwps
- X<
- X.I WordforWindows.ps
- X>
- X.I Fixed.ps
- X.SH DESCRIPTION
- X.I Fixwfwps
- Xis a
- X.I perl
- Xfilter which "fixes" PostScript from Word for Windows so
- Xthat it works correctly with Angus Duggan's
- X.B psutils
- Xpackage.
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- END_OF_fixwfwps.man
- if test 481 -ne `wc -c <fixwfwps.man`; then
- echo shar: \"fixwfwps.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixwfwps.pl -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixwfwps.pl\"
- else
- echo shar: Extracting \"fixwfwps.pl\" \(500 characters\)
- sed "s/^X//" >fixwfwps.pl <<'END_OF_fixwfwps.pl'
- X#!@PERL@
- X# fixwfwps: fix Word for windows PostScript for printing.
- X
- X# feed this into perl
- Xeval 'exec perl -S $0 "$@"'
- X if $running_under_some_shell;
- X
- Xwhile (<>) {
- X tr/\000-\011\013-\037//d;
- X s!/SVDoc\s+save\s+def!!g;
- X s!SVDoc\s+restore!!g;
- X if (/^(%!PS-Adobe-\d*\.\d*) EPSF-/) {
- X print "$1\n";
- X $wfwepsf = 1;
- X } elsif (/^SS\s*$/ && $wfwepsf) {
- X print "%%Page: $wfwepsf $wfwepsf\n";
- X $wfwepsf++;
- X print $_;
- X } elsif (! /^%%BoundingBox/) {
- X print $_;
- X }
- X}
- END_OF_fixwfwps.pl
- if test 500 -ne `wc -c <fixwfwps.pl`; then
- echo shar: \"fixwfwps.pl\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixwpps.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixwpps.man\"
- else
- echo shar: Extracting \"fixwpps.man\" \(467 characters\)
- sed "s/^X//" >fixwpps.man <<'END_OF_fixwpps.man'
- X.TH FIXWPPS 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xfixwpps \- filter to fix WP documents so PSUtils work
- X.SH SYNOPSIS
- X.B fixwpps
- X<
- X.I WordPerfect.ps
- X>
- X.I Fixed.ps
- X.SH DESCRIPTION
- X.I Fixwpps
- Xis a
- X.I perl
- Xfilter which "fixes" PostScript from WordPerfect 5.0 and 5.1 so
- Xthat it works correctly with Angus Duggan's
- X.B psutils
- Xpackage.
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- END_OF_fixwpps.man
- if test 467 -ne `wc -c <fixwpps.man`; then
- echo shar: \"fixwpps.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixwpps.pl -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixwpps.pl\"
- else
- echo shar: Extracting \"fixwpps.pl\" \(669 characters\)
- sed "s/^X//" >fixwpps.pl <<'END_OF_fixwpps.pl'
- X#!@PERL@
- X# fixwpps: get semi-conforming PostScript out of WordPerfect 5.0 file
- X
- X# feed this into perl
- Xeval 'exec perl -S $0 "$@"'
- X if $running_under_some_shell;
- X
- X$page = 1;
- X$nesting = 0;
- X
- Xwhile (<>) {
- X s/([^\/]_t)([0-9]+)/\1 \2/g; # fix wp 5.0 bug
- X if (m!/_[be][dp]! || m!_bp \d+ \d+ roll!) {
- X print $_;
- X } elsif (/^(.*)(_bp.*)$/) {
- X print "$1\n" if $1 ne "";
- X print "%%Page: $page $page\n";
- X print "$2\n";
- X $page++;
- X $nesting++;
- X } elsif (/_ep$/) {
- X print $_;
- X $nesting--;
- X } elsif (/^(.*)(_ed.*)/) {
- X print "$1\n" if $1 ne "";
- X print "%%Trailer:\n";
- X print "$2\n";
- X } else {
- X print $_;
- X }
- X}
- END_OF_fixwpps.pl
- if test 669 -ne `wc -c <fixwpps.pl`; then
- echo shar: \"fixwpps.pl\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixwwps.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixwwps.man\"
- else
- echo shar: Extracting \"fixwwps.man\" \(465 characters\)
- sed "s/^X//" >fixwwps.man <<'END_OF_fixwwps.man'
- X.TH FIXWWPS 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xfixwwps \- filter to fix Windows Write documents so PSUtils work
- X.SH SYNOPSIS
- X.B fixwwps
- X<
- X.I WinWrite.ps
- X>
- X.I Fixed.ps
- X.SH DESCRIPTION
- X.I Fixwwps
- Xis a
- X.I perl
- Xfilter which "fixes" PostScript from Windows Write so
- Xthat it works correctly with Angus Duggan's
- X.B psutils
- Xpackage.
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- END_OF_fixwwps.man
- if test 465 -ne `wc -c <fixwwps.man`; then
- echo shar: \"fixwwps.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f fixwwps.pl -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"fixwwps.pl\"
- else
- echo shar: Extracting \"fixwwps.pl\" \(364 characters\)
- sed "s/^X//" >fixwwps.pl <<'END_OF_fixwwps.pl'
- X#!@PERL@
- X# fixwwps: get semi-conforming PostScript out of Windows Write file
- X
- X# feed this into perl
- Xeval 'exec perl -S $0 "$@"'
- X if $running_under_some_shell;
- X
- X$page = 1;
- X
- Xwhile (<>) {
- X if (/^(%!.*) EPSF-\d.\d/) {
- X print $1, "\n";
- X } elsif (/^SS/) {
- X print "%%Page: $page $page\n";
- X print $_;
- X $page++;
- X } else {
- X print $_;
- X }
- X}
- END_OF_fixwwps.pl
- if test 364 -ne `wc -c <fixwwps.pl`; then
- echo shar: \"fixwwps.pl\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f getafm.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"getafm.man\"
- else
- echo shar: Extracting \"getafm.man\" \(702 characters\)
- sed "s/^X//" >getafm.man <<'END_OF_getafm.man'
- X.TH GETAFM 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xgetafm \- create an AFM file for a PostScript font.
- X.SH SYNOPSIS
- X.B getafm
- X.I FontName
- X>
- X.I fontname.afm
- X.SH DESCRIPTION
- X.I Getafm
- Xgenerates a PostScript file which prints an AFM file for a font to the
- Xprinter's output channel. The output of
- X.I getafm
- Xshould be sent to a printer, or to GhostScript. For example,
- X.sp
- X.ce
- Xgetafm Times-Roman | gsnd - >Times-Roman.afm
- X.sp
- X.SH AUTHOR
- XRobert Joop (rj@rainbow.in-berlin.de), Angus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- X.SH BUGS
- XKerning information is not generated by
- X.I getafm;
- Xit is best to use original AFM files if possible.
- END_OF_getafm.man
- if test 702 -ne `wc -c <getafm.man`; then
- echo shar: \"getafm.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f patchlevel.h -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"patchlevel.h\"
- else
- echo shar: Extracting \"patchlevel.h\" \(40 characters\)
- sed "s/^X//" >patchlevel.h <<'END_OF_patchlevel.h'
- X#define RELEASE 1
- X#define PATCHLEVEL 12
- END_OF_patchlevel.h
- if test 40 -ne `wc -c <patchlevel.h`; then
- echo shar: \"patchlevel.h\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f psbook.c -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"psbook.c\"
- else
- echo shar: Extracting \"psbook.c\" \(2155 characters\)
- sed "s/^X//" >psbook.c <<'END_OF_psbook.c'
- X/* psbook.c
- X * AJCD 27/1/91
- X * rearrange pages in conforming PS file for printing in signatures
- X *
- X * Usage:
- X * psbook [-q] [-s<signature>] [infile [outfile]]
- X */
- X
- X#include "psutil.h"
- X#include "patchlevel.h"
- X
- Xvoid usage()
- X{
- X fprintf(stderr, "%s release %d patchlevel %d\n", prog, RELEASE, PATCHLEVEL);
- X fprintf(stderr, "Usage: %s [-q] [-s<signature>] [infile [outfile]]\n",
- X prog);
- X fprintf(stderr, " <signature> must be positive and divisible by 4\n");
- X fflush(stderr);
- X exit(1);
- X}
- X
- X
- Xmain(argc, argv)
- X int argc;
- X char *argv[];
- X{
- X int signature = 0;
- X int currentpg, maxpage;
- X
- X infile = stdin;
- X outfile = stdout;
- X verbose = 1;
- X for (prog = *argv++; --argc; argv++) {
- X if (argv[0][0] == '-') {
- X switch (argv[0][1]) {
- X case 's': /* signature size */
- X signature = atoi(*argv+2);
- X if (signature < 1 || signature % 4) usage();
- X break;
- X case 'q': /* quiet */
- X verbose = 0;
- X break;
- X case 'v': /* version */
- X default:
- X usage();
- X }
- X } else if (infile == stdin) {
- X if ((infile = fopen(*argv, "r")) == NULL) {
- X fprintf(stderr, "%s: can't open input file %s\n", prog, *argv);
- X fflush(stderr);
- X exit(1);
- X }
- X } else if (outfile == stdout) {
- X if ((outfile = fopen(*argv, "w")) == NULL) {
- X fprintf(stderr, "%s: can't open output file %s\n", prog, *argv);
- X fflush(stderr);
- X exit(1);
- X }
- X } else usage();
- X }
- X if ((infile=seekable(infile))==NULL) {
- X fprintf(stderr, "%s: can't seek input\n", prog);
- X fflush(stderr);
- X exit(1);
- X }
- X scanpages();
- X
- X maxpage = pages+(4-pages%4)%4;
- X
- X if (!signature)
- X signature = maxpage;
- X
- X /* rearrange pages */
- X writeheader(maxpage);
- X writeprolog("");
- X for (currentpg = 0; currentpg < maxpage; currentpg++) {
- X int actualpg = currentpg - currentpg%signature;
- X switch(currentpg%4) {
- X case 0:
- X case 3:
- X actualpg += signature-1-(currentpg%signature)/2;
- X break;
- X case 1:
- X case 2:
- X actualpg += (currentpg%signature)/2;
- X break;
- X }
- X if (actualpg < pages)
- X writepage(actualpg);
- X else
- X writeemptypage();
- X }
- X writetrailer();
- X
- X exit(0);
- X}
- END_OF_psbook.c
- if test 2155 -ne `wc -c <psbook.c`; then
- echo shar: \"psbook.c\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f psbook.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"psbook.man\"
- else
- echo shar: Extracting \"psbook.man\" \(1072 characters\)
- sed "s/^X//" >psbook.man <<'END_OF_psbook.man'
- X.TH PSBOOK 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xpsbook \- rearrange pages in PostScript file into signatures
- X.SH SYNOPSIS
- X.B psbook
- X[
- X.B \-q
- X] [
- X.B \-s\fIsignature\fR
- X] [
- X.I infile
- X[
- X.I outfile
- X] ]
- X.SH DESCRIPTION
- X.I Psbook
- Xrearranges pages from a PostScript document into ``signatures'' for
- Xprinting books or booklets, creating a new PostScript file. The
- Xinput PostScript file should follow the Adobe Document Structuring
- XConventions.
- X.PP
- XThe
- X.I \-s
- Xoption selects the size of signature which will be used. The signature size is
- Xthe number of sides which will be folded and bound together; the number given
- Xshould be a multiple of four. The default is to use one signature for the
- Xwhole file. Extra blank sides will be added if the file does not contain a
- Xmultiple of four pages.
- X.PP
- XPsbook normally prints the page numbers of the pages rearranged; the
- X.I \-q
- Xoption suppresses this.
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- X.SH BUGS
- X.I Psbook
- Xdoes not accept all DSC comments.
- END_OF_psbook.man
- if test 1072 -ne `wc -c <psbook.man`; then
- echo shar: \"psbook.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f psnup.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"psnup.man\"
- else
- echo shar: Extracting \"psnup.man\" \(3454 characters\)
- sed "s/^X//" >psnup.man <<'END_OF_psnup.man'
- X.TH PSNUP 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xpsnup \- multiple pages per sheet
- X.SH SYNOPSIS
- X.B psnup
- X[
- X.B \-w\fIwidth\fR
- X] [
- X.B \-h\fIheight\fR
- X] [
- X.B \-p\fIpaper\fR
- X] [
- X.B \-l
- X] [
- X.B \-r
- X] [
- X.B \-f
- X] [
- X.B \-c
- X] [
- X.B \-m\fImargin\fR
- X] [
- X.B \-b\fIborder\fR
- X] [
- X.B \-d\fIlwidth\fR
- X] [
- X.B \-s\fIscale\fR
- X] [
- X.B \-\fInup\fR
- X] [
- X.B \-q
- X] [
- X.I infile
- X[
- X.I outfile
- X] ]
- X.SH DESCRIPTION
- X.I Psnup
- Xputs multiple logical pages onto each physical sheet of paper.
- XThe input PostScript file should follow the Adobe Document Structuring
- XConventions.
- X.PP
- XThe
- X.I \-w
- Xoption gives the paper width, and the
- X.I \-h
- Xoption gives the paper height,
- Xnormally specified in
- X.B "cm"
- Xor
- X.B "in"
- Xto convert
- XPostScript's points (1/72 of an inch)
- Xto centimeters or inches.
- XThe
- X.I \-p
- Xoption can be used as an alternative, to set the paper size to
- X.B a3, a4, a5, b5, letter, legal, tabloid, statement, executive, folio, quarto
- Xor
- X.B 10x14.
- XThe default paper size is
- X.B @PAPER@.
- X.PP
- XThe
- X.I \-l
- Xoption should be used for pages which are in landscape orientation (rotated 90
- Xdegrees anticlockwise). The
- X.I \-r
- Xoption should be used for pages which are in seascape orientation (rotated 90
- Xdegrees clockwise), and the
- X.I \-f
- Xoption should be used for pages which have the width and height interchanged,
- Xbut are not rotated.
- X.PP
- X.I Psnup
- Xnormally uses `row-major' layout, where adjacent pages are placed in rows
- Xacross the paper.
- XThe
- X.I \-c
- Xoption changes the order to `column-major', where successive pages are placed
- Xin columns down the paper.
- X.PP
- XA margin to leave around the whole page can be specified with the
- X.I \-m
- Xoption. This is useful for sheets of `thumbnail' pages, because the normal
- Xpage margins are reduced by putting multiple pages on a single sheet.
- X.PP
- XThe
- X.I \-b
- Xoption is used to specify an additional margin around each page on a sheet.
- X.PP
- XThe
- X.I \-d
- Xoption draws a line around the border of each page, of the specified width.
- XIf the \fIlwidth\fR parameter is omitted, a default linewidth of 1 point is
- Xassumed. The linewidth is relative to the original page dimensions,
- X\fIi.e.\fR it is scaled down with the rest of the page.
- X.PP
- XThe scale chosen by
- X.I psnup
- Xcan be overridden with the
- X.I \-s
- Xoption. This is useful to merge pages which are already reduced.
- X.PP
- XThe
- X.I \-\fInup\fR
- Xoption selects the number of logical pages to put on each sheet of paper. This
- Xcan be any whole number;
- X.I psnup
- Xtries to optimise the layout so that the minimum amount of space is wasted. If
- X.I psnup
- Xcannot find a layout within its tolerance limit, it will abort with an error
- Xmessage.
- X.PP
- X.I Psnup
- Xnormally prints the page numbers of the pages re-arranged; the
- X.I \-q
- Xoption suppresses this.
- X.SH EXAMPLES
- XThe potential use of this utility is varied but one particular
- Xuse is in conjunction with
- X.I psbook(1).
- XFor example, using groff to create a PostScript document and lpr as
- Xthe
- X.SM UNIX
- Xprint spooler a typical command line might look like this:
- X.sp
- Xgroff -Tps -ms \fIfile\fP | psbook | psnup -2 | lpr
- X.sp
- XWhere file is a 4 page document this command will result in a
- Xtwo page document printing two pages of \fIfile\fP per page and
- Xrearranges the page order to match the input pages 4 and 1
- Xon the first output page and
- Xpages 2 then 3 of the input document
- Xon the second output page.
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- X.SH BUGS
- X.I Psnup
- Xdoes not accept all DSC comments.
- END_OF_psnup.man
- if test 3454 -ne `wc -c <psnup.man`; then
- echo shar: \"psnup.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f psselect.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"psselect.man\"
- else
- echo shar: Extracting \"psselect.man\" \(1908 characters\)
- sed "s/^X//" >psselect.man <<'END_OF_psselect.man'
- X.TH PSSELECT 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xpsselect \- select pages from a PostScript file
- X.SH SYNOPSIS
- X.B psselect
- X[
- X.B \-q
- X] [
- X.B \-e
- X] [
- X.B \-o
- X] [
- X.B \-r
- X] [
- X.B \-p\fIpages\fR
- X] [
- X.I pages
- X] [
- X.I infile
- X[
- X.I outfile
- X] ]
- X.SH DESCRIPTION
- X.I Psselect
- Xselects pages from a PostScript document, creating a new PostScript file. The
- Xinput PostScript file should follow the Adobe Document Structuring
- XConventions.
- X.PP
- XThe
- X.I \-e
- Xoption selects all of the even pages; it may be used in conjunction with the
- Xother page selection options to select the even pages from a range of pages.
- X.PP
- XThe
- X.I \-o
- Xoption selects all of the odd pages; it may be used in conjunction with the
- Xother page selection options.
- X.PP
- XThe
- X.I \-p\fIpages\fR
- Xoption specifies the pages which are to be selected.
- X.I Pages
- Xis a comma separated list of page ranges, each of which may be a page number,
- Xor a page range of the form \fIfirst\fR-\fIlast\fR. If \fIfirst\fR is omitted,
- Xthe
- Xfirst page is assumed, and if \fIlast\fR is omitted, the last page is assumed.
- X
- XThe prefix character `_' indicates that the page number is relative to the end
- Xof the document, counting backwards.
- X.PP
- XThe
- X.I \-r
- Xoption causes
- X.I psselect
- Xto output the selected pages in reverse order.
- X.PP
- XPsselect normally prints the page numbers of the pages rearranged; the
- X.I \-q
- Xoption suppresses this.
- X.PP
- XIf any of the
- X.I \-r, \-e,
- Xor
- X.I \-o
- Xoptions are specified, the page range must be given with the
- X.I \-p
- Xoption. This is for backwards compatibility with previous versions.
- X
- X.SH NOTES
- XThe page number given to
- X.I psselect
- Xis the number of the page counting from the start or end of the file, starting
- Xat one. The actual page number in the document may be different.
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- X.SH BUGS
- X.I Psselect
- Xdoes not accept all DSC comments.
- END_OF_psselect.man
- if test 1908 -ne `wc -c <psselect.man`; then
- echo shar: \"psselect.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f psspec.h -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"psspec.h\"
- else
- echo shar: Extracting \"psspec.h\" \(602 characters\)
- sed "s/^X//" >psspec.h <<'END_OF_psspec.h'
- X/* psspec.h
- X * AJCD 5/6/93
- X * routines for page rearrangement specs
- X */
- X
- X#ifndef LOCAL
- X#define LOCAL extern
- X#endif
- X
- X/* pagespec flags */
- X#define ADD_NEXT (0x01)
- X#define ROTATE (0x02)
- X#define SCALE (0x04)
- X#define OFFSET (0x08)
- X#define GSAVE (ROTATE|SCALE|OFFSET)
- X
- Xstruct pagespec {
- X int reversed, pageno, flags, rotate;
- X double xoff, yoff, scale;
- X struct pagespec *next;
- X};
- X
- XLOCAL double width, height;
- X
- XLOCAL struct pagespec *newspec();
- XLOCAL int parseint();
- XLOCAL double parsedouble();
- XLOCAL double parsedimen();
- XLOCAL double singledimen();
- XLOCAL void pstops();
- X
- Xextern double atof();
- END_OF_psspec.h
- if test 602 -ne `wc -c <psspec.h`; then
- echo shar: \"psspec.h\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f pstops.man -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"pstops.man\"
- else
- echo shar: Extracting \"pstops.man\" \(3883 characters\)
- sed "s/^X//" >pstops.man <<'END_OF_pstops.man'
- X.TH PSTOPS 1 "PSUtils Release @REL@ Patchlevel @PL@"
- X.SH NAME
- Xpstops \- shuffle pages in a PostScript file
- X.SH SYNOPSIS
- X.B pstops
- X[
- X.B \-q
- X] [
- X.B \-b
- X] [
- X.B \-w\fIwidth\fR
- X] [
- X.B \-h\fIheight\fR
- X] [
- X.B \-p\fIpaper\fR
- X] [
- X.B \-d\fIlwidth\fR
- X]
- X.I pagespecs
- X[
- X.I infile
- X[
- X.I outfile
- X] ]
- X.SH DESCRIPTION
- X.I Pstops
- Xrearranges pages from a PostScript document, creating a new PostScript file.
- XThe input PostScript file should follow the Adobe Document Structuring
- XConventions.
- X.I Pstops
- Xcan be used to perform a large number of arbitrary re-arrangements of
- XDocuments, including arranging for printing 2-up, 4-up, booklets, reversing,
- Xselecting front or back sides of documents, scaling, etc.
- X.PP
- X.I pagespecs
- Xfollow the syntax:
- X.RS
- X.TP 12
- X.I pagespecs
- X.I = [modulo:]specs
- X.TP
- X.I specs
- X.I = spec[+specs][,specs]
- X.TP
- X.I spec
- X.I = [-]pageno[L][R][U][@scale][(xoff,yoff)]
- X.RE
- X.sp
- X.I modulo
- Xis the number of pages in each block. The value of
- X.I modulo
- Xshould be greater than 0; the default value is 1.
- X.I specs
- Xare the page specifications for the pages in each block. The value of the
- X.I pageno
- Xin each
- X.I spec
- Xshould be between 0 (for the first page in the block) and \fImodulo\fR-1
- X(for the last page in each block) inclusive.
- XThe optional dimensions
- X.I xoff
- Xand
- X.I yoff
- Xshift the page by the specified amount.
- X.I xoff
- Xand
- X.I yoff
- Xare in PostScript's points, but may be followed by the units
- X.B "cm"
- Xor
- X.B "in"
- Xto convert to centimetres or inches, or the flag
- X.B "w"
- Xor
- X.B "h"
- Xto specify as a multiple of the width or height.
- XThe optional parameters \fIL\fR, \fIR\fR, and \fIU\fR rotate the page left,
- Xright, or upside-down.
- XThe optional
- X.I scale
- Xparameter scales the page by the fraction specified.
- XIf the optional minus sign is specified, the page is relative to the end of
- Xthe document, instead of the start.
- X
- XIf page \fIspec\fRs are separated by
- X.B \+
- Xthe pages will be merged into one page; if they are separated by
- X.B \,
- Xthey will be on separate pages.
- XIf there is only one page specification, with
- X.I pageno
- Xzero, the \fIpageno\fR may be omitted.
- X
- XThe shift, rotation, and scaling are performed
- Xin that order regardless of which order
- Xthey appear on the command line.
- X.PP
- XThe
- X.I \-w
- Xoption gives the width which is used by the
- X.B "w"
- Xdimension specifier, and the
- X.I \-h
- Xoption gives the height which is used by the
- X.B "h"
- Xdimension specifier. These dimensions are also used (after scaling) to set the
- Xclipping path for each page.
- XThe
- X.I \-p
- Xoption can be used as an alternative, to set the paper size to
- X.B a3, a4, a5, b5, letter, legal, tabloid, statement, executive, folio, quarto
- Xor
- X.B 10x14.
- XThe default paper size is
- X.B @PAPER@.
- X.PP
- XThe
- X.I \-b
- Xoption prevents any
- X.B bind
- Xoperators in the PostScript prolog from binding. This may be needed in cases
- Xwhere complex multi-page re-arrangements are being done.
- X.PP
- XThe
- X.I \-d
- Xoption draws a line around the border of each page, of the specified width.
- XIf the \fIlwidth\fR parameter is omitted, a default linewidth of 1 point is
- Xassumed. The linewidth is relative to the original page dimensions,
- X\fIi.e.\fR it is scaled up or down with the rest of the page.
- X.PP
- XPstops normally prints the page numbers of the pages re-arranged; the
- X.I \-q
- Xoption suppresses this.
- X.SH EXAMPLES
- XThis section contains some sample re-arrangements. To put two pages on one
- Xsheet (of A4 paper), the pagespec to use is:
- X.sp
- X.ce
- X2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)
- X.sp
- XTo select all of the odd pages in reverse order, use:
- X.sp
- X.ce
- X2:-0
- X.sp
- XTo re-arrange pages for printing 2-up booklets, use
- X.sp
- X.ce
- X4:-3L@.7(21cm,0)+0L@.7(21cm,14.85cm)
- X.sp
- Xfor the front sides, and
- X.sp
- X.ce
- X4:1L@.7(21cm,0)+-2L@.7(21cm,14.85cm)
- X.sp
- Xfor the reverse sides (or join them with a comma for duplex printing).
- X.SH AUTHOR
- XAngus Duggan
- X.SH "SEE ALSO"
- X@MAN@
- X.SH TRADEMARKS
- X.B PostScript
- Xis a trademark of Adobe Systems Incorporated.
- X.SH BUGS
- X.I Pstops
- Xdoes not accept all DSC comments.
- END_OF_pstops.man
- if test 3883 -ne `wc -c <pstops.man`; then
- echo shar: \"pstops.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f psutil.h -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"psutil.h\"
- else
- echo shar: Extracting \"psutil.h\" \(988 characters\)
- sed "s/^X//" >psutil.h <<'END_OF_psutil.h'
- X/* psutil.h
- X * AJCD 29/1/91
- X * utilities for PS programs
- X */
- X
- X#include <stdio.h>
- X#include <ctype.h>
- X
- X#ifndef LOCAL
- X#define LOCAL extern
- X#endif
- X
- X#define TMPDIR "/tmp"
- X
- X/* paper size structure; configurability and proper paper resources will have
- X to wait until version 2 */
- Xstruct papersize {
- X char *name; /* name of paper size */
- X int width, height; /* width, height in points */
- X};
- X
- XLOCAL char *prog;
- XLOCAL int pages;
- XLOCAL int verbose;
- XLOCAL FILE *infile;
- XLOCAL FILE *outfile;
- XLOCAL char pagelabel[BUFSIZ];
- XLOCAL int pageno;
- X
- XLOCAL struct papersize *findpaper();
- XLOCAL FILE *seekable();
- XLOCAL void writepage();
- XLOCAL void seekpage();
- XLOCAL void writepageheader();
- XLOCAL void writepagebody();
- XLOCAL void writeheader();
- XLOCAL void writeprolog();
- XLOCAL void writetrailer();
- XLOCAL void writeemptypage();
- XLOCAL void scanpages();
- XLOCAL void writestring();
- XLOCAL void message();
- X
- Xextern long lseek();
- Xextern long ftell();
- Xextern char *getenv();
- X#ifdef VMS
- X#define unlink delete
- X#endif
- X
- END_OF_psutil.h
- if test 988 -ne `wc -c <psutil.h`; then
- echo shar: \"psutil.h\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f showchar -a "${1}" != "-c" ; then
- echo shar: Will not over-write existing file \"showchar\"
- else
- echo shar: Extracting \"showchar\" \(2567 characters\)
- sed "s/^X//" >showchar <<'END_OF_showchar'
- X#!/bin/sh
- X# showchar: show character with information
- X# usage:
- X# showchar Font-Name Char-Name | lpr -Pprinter
- X
- Xif [ $# != 2 ]; then
- X echo "Usage: `basename $0` Font-Name Char-Name" >&2
- X exit 1
- Xfi
- X
- Xcat <<EOF
- X%!
- X% Get character metrics and bounding box for $1
- X/ns 30 string def
- X/fname /$1 def
- X/cname /$2 def
- X/fn fname findfont 1000 scalefont def
- X/thin 0.7 def
- X/reduction 2.0 def
- X
- X/sn { ns cvs show } def
- X/sc { (\()show exch sn (,)show sn (\))show } def
- X
- X/Times-Roman findfont 10 scalefont setfont
- X
- X72 242 translate % one inch in, 3 1/2 inch up
- Xnewpath 0 0 moveto
- Xgsave % print character name
- X 0 468 rmoveto
- X ($2 from font $1 displayed on `date` by `basename $0` 1.00 (C) AJCD 1991)
- X show
- Xgrestore
- X
- Xgsave
- X thin setlinewidth % cross hairs
- X -9 0 rmoveto 18 0 rlineto
- X -9 -9 rmoveto 0 18 rlineto
- X stroke % position info
- X -9 -9 moveto ((0,0)) stringwidth pop neg 0 rmoveto
- X ((0,0)) show
- Xgrestore
- X
- X% create encoding with a single character at all positions
- X/MyEncoding 256 array def
- X
- X0 1 255 { % fill out with notdefs
- X MyEncoding exch cname put
- X} for
- X
- Xfn dup length dict begin
- X {1 index /FID ne {def} {pop pop} ifelse} forall
- X /Encoding MyEncoding def
- X currentdict
- Xend /newfont exch definefont
- X/fn exch def
- X/en MyEncoding def
- X
- Xgsave % draw character (enlarged)
- X .75 setgray
- X fn 1 reduction div scalefont setfont
- X (\000) show
- Xgrestore
- X
- X% show character info
- Xfn /Metrics known {
- X dup fn /Metrics get exch get
- X dup type /arraytype eq {
- X dup length 2 eq
- X {1 get 0} {dup 2 get exch 3 get} ifelse
- X } {
- X round 0
- X } ifelse
- X} {
- X gsave
- X fn setfont (\000) stringwidth round exch round exch
- X grestore
- X} ifelse
- Xgsave % show width
- X thin setlinewidth
- X 2 copy
- X reduction div exch reduction div exch rlineto
- X gsave
- X 1 1 rmoveto sc
- X grestore
- X -4 -3 rlineto 0 6 rmoveto 4 -3 rlineto
- X stroke
- Xgrestore
- X
- Xgsave
- X gsave % get bounding box
- X fn setfont
- X (\000) true charpath flattenpath pathbbox
- X grestore
- X thin setlinewidth
- X 3 index reduction div % put coords on top of stack
- X 3 index reduction div
- X 3 index reduction div
- X 3 index reduction div
- X 3 index 3 index moveto
- X gsave % llx lly
- X 0 -9 rmoveto 7 index 7 index sc
- X grestore
- X 1 index 3 index lineto
- X gsave % urx lly
- X 0 -9 rmoveto 5 index 7 index sc
- X grestore
- X 1 index 1 index lineto
- X gsave % urx ury
- X 0 9 rmoveto 5 index 5 index sc
- X grestore
- X 3 index 1 index lineto
- X gsave % llx ury
- X 0 9 rmoveto 7 index 5 index sc
- X grestore
- X closepath stroke
- Xgrestore
- Xshowpage
- XEOF
- END_OF_showchar
- if test 2567 -ne `wc -c <showchar`; then
- echo shar: \"showchar\" unpacked with wrong size!
- fi
- chmod +x showchar
- # end of overwriting check
- fi
- echo shar: End of archive 1 \(of 4\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 4 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
- exit 0 # Just in case...
-