[727] in Enterprise Print Delivery Team
Programs for manipulating Postscript files
daemon@ATHENA.MIT.EDU (David M. Rosenberg)
Tue Nov 28 12:01:14 2000
Mime-Version: 1.0
Message-Id: <p05010401b64991aa47ef@[18.18.0.106]>
Date: Tue, 28 Nov 2000 12:01:06 -0500
To: printdel@MIT.EDU
From: "David M. Rosenberg" <Rosenberg@MIT.EDU>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
I want to call the attention of the Print Delivery team to a utility
program named "psnup" (Postscript N-up) on Athena that purports to take as
input a postscript file formatted for 1-up printing and produce as output a
postscript file formatted for n-up printing. (I am appending the man page
for the Athena psnup program.)
I also want to call to your attention a set of postscript utility programs
that I found on the web. This set also includes a different program named
"psnup" that also purports to take as input a postscript file formatted for
1-up printing and produce as output a postscript file formatted for n-up
printing. The set of postscript utility programs includes programs that
perform various other manipulations on postscript files. (I am also
appending documentation for the set of postscript utility programs.)
/David Rosenberg
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
athena% man psnup
User Commands PSNUP(1)
NAME
psnup - print multiple pages on a sheet of paper.
SYNOPSIS
psnup [ -rGf ] [ -nnupspec ] [ -Spapersize ] [ -spagesize ]
[ -wpagewidth ] [ -hpageheight ]
[ -poutputfile ] [ -Pprinter ] [ -dprinter ] [ file ]
DESCRIPTION
psnup reads in a POSTSCRIPT language file (or the standard
input if no file is named) and, if the input conforms to the
POSTSCRIPT language document structuring conventions, pro-
vides page rotation, printing of multiple pages on a sheet
of paper (n-up printing), selection of page and paper sizes,
and writes the resulting file on the standard output. The
output may be directed to a file.
The possible options are:
-nnupspec
nupspec may be a single number specifying how many
pages will be printed on each sheet of paper, or a
specification of the form: n x m, where n and m
specify rows and columns, respectively. Rows refers to
the number of page images across a sheet of paper,
columns to the number of page images down a sheet of
paper. The specification -n2x2 is equivalent to the
specification -n4. If the number of pages on a sheet
is specified as a single number, the number must be a
power of 2.
-r rotates the page 90 degrees (landscape mode). When
using the n-up capability of psnup, this option is
preferable to the landscape option of pslpr because the
rotation of the page is taken into account when laying
out multiple pages on a sheet of paper.
-Spapersize
specifies size of paper for which output is to be for-
matted. The default is Letter (8.5 x 11).
-spagesize
specifies the size of pages being printed n-up (i.e.,
the original size). The default is Letter (8.5 x 11).
-wpagewidth
if the size of the pages being printed n-up isn't a
standard size, you can specify the width and height
instead. Numbers followed by "i" will be interpreted
in inches, by "m" in millimeters, and numbers without
qualification will be interpreted as specifying the
distance in points.
-hpageheight
specifies the height of the page being printed n-up.
-G formats the document in psnup's "gaudy" mode, with
borders around the virtual pages. If no n-up specifi-
cation is given, the input file is printed with four
virtual pages per sheet of paper.
-poutputfile
writes output to the specified file. -p- means write
output to standard output.
-Pprintername
-dprintername
uses printername's POSTSCRIPT Printer Description file
for information about available paper sizes. The
result is not spooled to the printer.
EXAMPLES
The following command reads a POSTSCRIPT language file
called printfile.ps and formats it with four pages on a
sheet of paper. The file is piped through pslpr to be
printed on the printer called ps.
psnup -n4 printfile.ps | pslpr -Pps
In this example, a text file is processed by enscript,
creating a POSTSCRIPT language file, which is piped to
psnup, which rotates the file and formats it with three vir-
tual pages across and two virtual pages down the paper. The
formatted file is printed by piping the file through pslpr.
enscript -p- textfile | psnup -r -n3x2 | pslpr
In this example, a text file is processed by enscript,
creating a POSTSCRIPT language file, which is piped to
psnup, formatted in gaudy mode ( -G option), with four vir-
tual pages per actual page of output. The formatted file is
printed by piping the file through pslpr. The result is
printed pages with four original text pages on each sheet,
with each original text page surrounded by a border.
enscript -p- textfile | psnup -G -n4 | pslpr
FILES
/usr/athena/share/ps/psnup.pro
the prologue for psnup files.
SEE ALSO
transcript(1), enscript(1), pslpr (1), postscript(7).
AUTHOR
Adobe Systems Incorporated
NOTES
POSTSCRIPT is a registered trademark of Adobe Systems Incor-
porated.
Adobe Systems Last change: 19 August 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
From <http://www.dcs.ed.ac.uk/home/ajcd/psutils/>
PSUtils
PSUtils is a collection of useful utilities for manipulating PostScript
documents. Programs included are psnup, for placing out several logical
pages on a single sheet of paper, psselect, for selecting pages from a
document, pstops, for general imposition, psbook, for signature
generation for booklet printing, and psresize, for adjusting page sizes.
PSUtils is available as a tarred gzipped file from
ftp://ftp.dcs.ed.ac.uk/pub/ajcd/psutils.tar.gz or from
ftp://ftp.tardis.ed.ac.uk/users/ajcd/psutils.tar.gz.
There are Win32 compiled binaries (compiled with A4 paper as default) in
ftp://ftp.dcs.ed.ac.uk/pub/ajcd/psutils-p17-a4-nt.zip. and
ftp://ftp.tardis.ed.ac.uk/users/ajcd/psutils-p17-a4-nt.zip.
These programs come with NO WARRANTY, implied or express. Use at your
own risk.
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 x86 machines under MSDOS 6.0 and Windows NT 3.5 and 4.0.
Files
The files contained are:
-rw-r--r-- 1 angus 2317 Jun 19 1995 LICENSE
-rw-r--r-- 1 angus 2899 Mar 09 09:26 Makefile.bcc
-rw-r--r-- 1 angus 2915 Mar 09 09:26 Makefile.msc
-rw-r--r-- 1 angus 4135 Mar 09 09:26 Makefile.nt
-rw-r--r-- 1 angus 7146 Mar 09 09:26 Makefile.os2
-rw-r--r-- 1 angus 2895 Mar 09 09:26 Makefile.sc
-rw-r--r-- 1 angus 6913 Mar 09 09:26 Makefile.unix
-rw-r--r-- 1 angus 11345 Mar 09 09:20 README
-rw-r--r-- 1 angus 678 Nov 02 1995 config.h
-rw-r--r-- 1 angus 2373 Jun 19 1995 descrip.mms
-rw-r--r-- 1 angus 5773 Mar 14 1996 epsffit.c
-rw-r--r-- 1 angus 1291 Nov 02 1995 epsffit.man
-rw-r--r-- 1 angus 1236 Nov 02 1995 extractres.man
-rw-r--r-- 1 angus 2780 Nov 02 1995 extractres.pl
-rw-r--r-- 1 angus 561 Nov 02 1995 fixdlsrps.man
-rw-r--r-- 1 angus 1554 Nov 02 1995 fixdlsrps.pl
-rw-r--r-- 1 angus 527 Nov 02 1995 fixfmps.man
-rw-r--r-- 1 angus 556 Nov 02 1995 fixfmps.pl
-rw-r--r-- 1 angus 644 Nov 02 1995 fixmacps.man
-rw-r--r-- 1 angus 2170 Nov 02 1995 fixmacps.pl
-rw-r--r-- 1 angus 556 Nov 02 1995 fixpsditps.man
-rw-r--r-- 1 angus 655 Nov 02 1995 fixpsditps.pl
-rw-r--r-- 1 angus 523 Nov 02 1995 fixpspps.man
-rw-r--r-- 1 angus 1298 Nov 02 1995 fixpspps.pl
-rw-r--r-- 1 angus 531 Nov 02 1995 fixscribeps.man
-rw-r--r-- 1 angus 434 Nov 02 1995 fixscribeps.pl
-rw-r--r-- 1 angus 553 Nov 02 1995 fixtpps.man
-rw-r--r-- 1 angus 663 Nov 02 1995 fixtpps.pl
-rw-r--r-- 1 angus 547 Nov 02 1995 fixwfwps.man
-rw-r--r-- 1 angus 826 Nov 02 1995 fixwfwps.pl
-rw-r--r-- 1 angus 533 Nov 02 1995 fixwpps.man
-rw-r--r-- 1 angus 699 Nov 02 1995 fixwpps.pl
-rw-r--r-- 1 angus 531 Nov 02 1995 fixwwps.man
-rw-r--r-- 1 angus 383 Nov 02 1995 fixwwps.pl
-rw-r--r-- 1 angus 711 Apr 06 1995 getafm.man
-rwxr-xr-x 1 angus 6482 Jun 19 1995 getafm.sh
-rw-r--r-- 1 angus 1107 Nov 02 1995 includeres.man
-rw-r--r-- 1 angus 1435 Nov 02 1995 includeres.pl
-rw-r--r-- 1 angus 1901 Jan 03 1996 maketext
-rw-r--r-- 1 angus 31406 Jun 19 1995 md68_0.ps
-rw-r--r-- 1 angus 35734 Jun 19 1995 md71_0.ps
-rw-r--r-- 1 angus 132 Nov 02 1995 patchlev.h
-rw-r--r-- 1 angus 2875 Nov 02 1995 psbook.c
-rw-r--r-- 1 angus 1156 Nov 02 1995 psbook.man
-rw-r--r-- 1 angus 3201 Nov 02 1995 pserror.c
-rw-r--r-- 1 angus 561 Nov 02 1995 pserror.h
-rw-r--r-- 1 angus 957 Nov 02 1995 psmerge.man
-rw-r--r-- 1 angus 2028 Nov 02 1995 psmerge.pl
-rw-r--r-- 1 angus 10396 Nov 02 1995 psnup.c
-rw-r--r-- 1 angus 4002 Nov 02 1995 psnup.man
-rw-r--r-- 1 angus 5379 Nov 02 1995 psresize.c
-rw-r--r-- 1 angus 1696 Nov 02 1995 psresize.man
-rw-r--r-- 1 angus 6096 Jun 05 1996 psselect.c
-rw-r--r-- 1 angus 2117 Mar 09 09:12 psselect.man
-rw-r--r-- 1 angus 7784 Dec 06 1995 psspec.c
-rw-r--r-- 1 angus 877 Feb 21 1996 psspec.h
-rw-r--r-- 1 angus 5159 Nov 02 1995 pstops.c
-rw-r--r-- 1 angus 4091 Nov 02 1995 pstops.man
-rw-r--r-- 1 angus 9323 Mar 04 13:41 psutil.c
-rw-r--r-- 1 angus 1494 Nov 02 1995 psutil.h
-rwxr-xr-x 1 angus 2685 Jun 19 1995 showchar.sh
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, an 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@squirrel.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
Mike Coleman
Dale Scheetz dwarf@polaris.net
Yves Arrouye arrouye@marin.fdn.fr
(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 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 has some minor bug fixes.
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 bug fixed
maketext and fix scripts updated for Perl 5
Patchlevel 16 was a minor bugfix release
Piped output and input works correctly in NT
Patchlevel 17 had some minor bugfixes and improvements
Trailer information now put before %%EOF comments if no %%Trailer
psselect can now add blank pages.
Piped input works in Linux
Last modified on 30th July 1999 by angus@harlequin.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
From <http://www.dcs.ed.ac.uk/home/ajcd/psutils/psbook.html>
Name
psbook - rearrange pages in PostScript file into signatures
Synopsis
psbook [ -q ] [ -ssignature ] [ infile [ outfile ] ]
Description
Psbook rearranges pages from a PostScript document into "signatures"
for printing books or booklets, creating a new PostScript file. The
input PostScript file should follow the Adobe Document Structuring
Conventions.
The -s option selects the size of signature which will be used. The
signature size is the number of sides which will be folded and bound
together; the number given should be a multiple of four. The default is
to use one signature for the whole file. Extra blank sides will be added
if the file does not contain a multiple of four pages.
Psbook normally prints the page numbers of the pages rearranged; the -q
option suppresses this.
Author
Copyright © Angus J. C. Duggan 1991-1995
See Also
epsffit, extractres, fixdlsrps, fixfmps, fixmacps, fixpsditps, fixpspps,
fixscribeps, fixtpps, fixwfwps, fixwpps, fixwwps, getafm, includeres,
psbook, psmerge, psnup, psresize, psselect, pstops
Trademarks
PostScript is a trademark of Adobe Systems Incorporated.
Bugs
Psbook does not accept all legal DSC comments.
Last modified on 9th March 1997 by angus@harlequin.co.uk
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
From <http://www.dcs.ed.ac.uk/home/ajcd/psutils/psselect.html>
Name
psselect - select pages from a PostScript file
Synopsis
psselect [ -q ] [ -e ] [ -o ] [ -r ] [ -ppages ] [ pages ]
[ infile [ outfile ] ]
Description
Psselect selects pages from a PostScript document, creating a new
PostScript file. The input PostScript file should follow the Adobe
Document Structuring Conventions.
The -e option selects all of the even pages; it may be used in
conjunction with the other page selection options to select the even
pages from a range of pages.
The -o option selects all of the odd pages; it may be used in
conjunction with the other page selection options.
The -ppages option specifies the pages which are to be selected. Pages
is a comma separated list of page ranges, each of which may be a page
number, or a page range of the form first-last. If first is omitted, the
first page is assumed, and if last is omitted, the last page is assumed.
The prefix character `_' indicates that the page number is relative to
the end of the document, counting backwards. If just this character with
no page number is used, a blank page will be inserted in the output.
The -r option causes psselect to output the selected pages in reverse
order.
Psselect normally prints the page numbers of the pages rearranged; the
-q option suppresses this.
If any of the -r, -e, or -o options are specified, the page range must
be given with the -p option. This is for backwards compatibility with
previous versions.
Notes
The page number given to psselect is the number of the page counting
from the start or end of the file, starting at one. The actual page
number in the document may be different.
Author
Copyright © Angus J. C. Duggan 1991-1995
See Also
epsffit, extractres, fixdlsrps, fixfmps, fixmacps, fixpsditps, fixpspps,
fixscribeps, fixtpps, fixwfwps, fixwpps, fixwwps, getafm, includeres,
psbook, psmerge, psnup, psresize, psselect, pstops
Trademarks
PostScript is a trademark of Adobe Systems Incorporated.
Bugs
Psselect does not accept all legal DSC comments.
Last modified on 9th March 1997 by angus@harlequin.co.uk
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
From <http://www.dcs.ed.ac.uk/home/ajcd/psutils/pstops.html>
Name
pstops - shuffle pages in a PostScript file
Synopsis
pstops [ -q ] [ -b ] [ -wwidth ] [ -hheight ] [ -ppaper ] [ -dlwidth ]
pagespecs [ infile [ outfile ] ]
Description
Pstops rearranges pages from a PostScript document, creating a new
PostScript file. The input PostScript file should follow the Adobe
Document Structuring Conventions. Pstops can be used to perform a large
number of arbitrary re-arrangements of Documents, including arranging
for printing 2-up, 4-up, booklets, reversing, selecting front or back
sides of documents, scaling, etc.
pagespecs follow the syntax:
pagespecs = [modulo:]specs
specs = spec[+specs][,specs]
spec = [-]pageno[L][R][U][@scale][(xoff,yoff)]
modulo is the number of pages in each block. The value of modulo should
be greater than 0; the default value is 1. specs are the page
specifications for the pages in each block. The value of the pageno in
each spec should be between 0 (for the first page in the block) and
modulo-1 (for the last page in each block) inclusive.
The optional dimensions xoff and yoff shift the page by the specified
amount. xoff and yoff are in PostScript's points, but may be followed by
the units `cm' or `in' to convert to centimetres or inches, or the flags
`w' or `h' to specify as a multiple of the width or height.
The optional flags L, R, and U rotate the page left, right, or
upside-down. The optional scale parameter scales the page by the
fraction specified. If the optional minus sign is specified, the page is
relative to the end of the document, instead of the start.
If page specs are separated by + the pages will be merged into one page;
if they are separated by , they will be on separate pages. If there is
only one page specification, with pageno zero, it may be omitted.
The shift, rotation, and scaling are performed in that order regardless
of which order they appear on the command line.
The -w option gives the width which is used by the `w' dimension
specifier, and the -h option gives the height which is used by the `h'
dimension specifier. These dimensions are also used (after scaling) to
set the clipping path for each page. The -p option can be used as an
alternative, to set the paper size to a3, a4, a5, b5, letter, legal,
tabloid, statement, executive, folio, quarto or 10x14. The default paper
size is a4.
The -b option prevents any bind operators in the PostScript prolog from
binding. This may be needed in cases where complex multi-page
re-arrangements are being done.
The -d option draws a line around the border of each page, of the
specified width. If the lwidth parameter is omitted, a default linewidth
of 1 point is assumed. The linewidth is relative to the original page
dimensions, i.e., it is scaled up or down with the rest of the page.
Pstops normally prints the page numbers of the pages re-arranged; the -q
option suppresses this.
Examples
This section contains some sample re-arrangements. To put two pages on
one sheet (of A4 paper), the pagespec to use is:
2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)
To select all of the odd pages in reverse order, use:
2:-0
To re-arrange pages for printing 2-up booklets, use
4:-3L@.7(21cm,0)+0L@.7(21cm,14.85cm)
for the front sides, and
4:1L@.7(21cm,0)+-2L@.7(21cm,14.85cm)
for the reverse sides.
Author
Copyright © Angus J. C. Duggan 1991-1995
See Also
epsffit, extractres, fixdlsrps, fixfmps, fixmacps, fixpsditps, fixpspps,
fixscribeps, fixtpps, fixwfwps, fixwpps, fixwwps, getafm, includeres,
psbook, psmerge, psnup, psresize, psselect, pstops
Trademarks
PostScript is a trademark of Adobe Systems Incorporated.
Bugs
Pstops does not accept all legal DSC comments.
Last modified on 9th March 1997 by angus@harlequin.co.uk
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
From <http://www.dcs.ed.ac.uk/home/ajcd/psutils/psnup.html>
Name
psnup - multiple pages per sheet
Synopsis
psnup [ -wwidth ] [ -hheight ] [ -ppaper ] [ -Wwidth ] [ -Hheight ]
[ -Ppaper ] [ -l ] [ -r ] [ -f ] [ -c ] [ -mmargin ] [ -bborder ]
[ -dlwidth ] [ -sscale ] [ -nup ] [ -q ] [ infile [ outfile ] ]
Description
Psnup puts multiple logical pages onto each physical sheet of paper. The
input PostScript file should follow the Adobe Document Structuring
Conventions.
The -w option gives the paper width, and the -h option gives the paper
height, normally specified in `cm' or `in' to convert PostScript's
points (1/72 of an inch) to centimeters or inches. The -p option can be
used as an alternative, to set the paper size to a3, a4, a5, b5, letter,
legal, tabloid, statement, executive, folio, quarto or 10x14. The
default paper size is a4.
The -W, -H, and -P options set the input paper size, if it is different
from the output size. This makes it easy to impose pages of one size on
a different size of paper.
The -l option should be used for pages which are in landscape
orientation (rotated 90 degrees anticlockwise). The -r option should be
used for pages which are in seascape orientation (rotated 90 degrees
clockwise), and the -f option should be used for pages which have the
width and height interchanged, but are not rotated.
Psnup normally uses `row-major' layout, where adjacent pages are placed
in rows across the paper. The -c option changes the order to
`column-major', where successive pages are placed in columns down the
paper.
A margin to leave around the whole page can be specified with the -m
option. This is useful for sheets of `thumbnail' pages, because the
normal page margins are reduced by putting multiple pages on a single
sheet.
The -b option is used to specify an additional margin around each page
on a sheet.
The -d option draws a line around the border of each page, of the
specified width. If the lwidth parameter is omitted, a default linewidth
of 1 point is assumed. The linewidth is relative to the original page
dimensions, i.e., it is scaled down with the rest of the page.
The scale chosen by psnup can be overridden with the -s option. This is
useful to merge pages which are already reduced.
The -nup option selects the number of logical pages to put on each sheet
of paper. This can be any whole number; psnup tries to optimise the
layout so that the minimum amount of space is wasted. If psnup cannot
find a layout within its tolerance limit, it will abort with an error
message. The alternative form -n nup can also be used, for compatibility
with other n-up programs.
Psnup normally prints the page numbers of the pages re-arranged; the -q
option suppresses this.
Examples
The potential use of this utility is varied but one particular use is in
conjunction with psbook. For example, using groff to create a PostScript
document and lpr as the Unix print spooler a typical command line might
look like this:
groff -Tps -ms file | psbook | psnup -2 | lpr
Where file is a 4 page document this command will result in a two page
document printing two pages of file per page and rearranges the page
order to match the input pages 4 and 1 on the first output page and
pages 2 then 3 of the input document on the second output page.
Author
Copyright © Angus J. C. Duggan 1991-1995
See Also
epsffit, extractres, fixdlsrps, fixfmps, fixmacps, fixpsditps, fixpspps,
fixscribeps, fixtpps, fixwfwps, fixwpps, fixwwps, getafm, includeres,
psbook, psmerge, psnup, psresize, psselect, pstops
Trademarks
PostScript is a trademark of Adobe Systems Incorporated.
Bugs
Psnup does not accept all legal DSC comments.
Last modified on 9th March 1997 by angus@harlequin.co.uk
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
From <http://www.dcs.ed.ac.uk/home/ajcd/psutils/psresize.html>
Name
psresize - adjust paper size of PostScript document
Synopsis
psresize [ -wwidth ] [ -hheight ] [ -ppaper ] [ -Wwidth ] [ -Hheight ]
[ -Ppaper ] [ -q ] [ infile [ outfile ] ]
Description
Psresize rescales and centres a document on a different size of paper.
The input PostScript file should follow the Adobe Document Structuring
Conventions.
The -w option gives the output paper width, and the -h option gives the
output paper height, normally specified in `cm' or `in' to convert
PostScript's points (1/72 of an inch) to centimeters or inches. The -p
option can be used as an alternative, to set the output paper size to
a3, a4, a5, b5, letter, legal, tabloid, statement, executive, folio,
quarto or 10x14. The default output paper size is a4.
The -W option gives the input paper width, and the -H option gives the
input paper height. The -P option can be used as an alternative, to set
the input paper size. The default input paper size is a4.
Psresize normally prints the page numbers of the pages output; the -q
option suppresses this.
Examples
The following command can be used to convert a document on A4 size paper
to letter size paper:
psresize -PA4 -pletter in.ps > out.ps
Author
Copyright © Angus J. C. Duggan 1991-1995
See Also
epsffit, extractres, fixdlsrps, fixfmps, fixmacps, fixpsditps, fixpspps,
fixscribeps, fixtpps, fixwfwps, fixwpps, fixwwps, getafm, includeres,
psbook, psmerge, psnup, psresize, psselect, pstops
Trademarks
PostScript is a trademark of Adobe Systems Incorporated.
Bugs
Psresize does not accept all legal DSC comments.
Last modified on 9th March 1997 by angus@harlequin.co.uk
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
From <http://www.dcs.ed.ac.uk/home/ajcd/psutils/epsffit.html>
Name
epsffit - fit encapsulated PostScript file (EPSF) into constrained size
Synopsis
epsffit [ -c ] [ -r ] [ -a ] [ -m ] [ -s ] llx lly urx ury
[ infile [ outfile ] ]
Description
Epsffit fits an EPSF file (encapsulated PostScript) to a given bounding
box. The coordinates of the box are given by (llx, lly) for the lower
left, and (urx,ury) for the upper right, in PostScript units (points).
If no input or output files are specified, epsffit read from the
standard input and writes to the standard output.
Options
-c Center the image in the given bounding box.
-r Rotate the image by 90 degrees counter-clockwise.
-a Adjust the aspect ratio to fit the bounding box. The default is to
preserve the aspect ratio.
-m Rotates the image to maximise the size if it would fit the
specified bounding box better.
-s Add a showpage at the end of the file to force the image to print.
Author
Copyright © Angus J. C. Duggan 1991-1995
See Also
epsffit, extractres, fixdlsrps, fixfmps, fixmacps, fixpsditps, fixpspps,
fixscribeps, fixtpps, fixwfwps, fixwpps, fixwwps, getafm, includeres,
psbook, psmerge, psnup, psresize, psselect, pstops
Trademarks
PostScript is a trademark of Adobe Systems Incorporated.
Last modified on 9th March 1997 by angus@harlequin.co.uk
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Connecting to ftp.dcs.ed.ac.uk port 21 (11/23/2000 12:44:24 PM)
220-
220- This is the University of Edinburgh Department of Computer Science's
220- read-only anonymous-only FTP service. Please address all queries to
220- <support@dcs.ed.ac.uk>. For non-anonymous FTP, please use host
220- userftp.dcs.ed.ac.uk instead.
220-
220- NOTICE: all transactions are logged. By connecting to this service
220- you agree to this being done.
220-
220- DISCLAIMER: in common with other anonymous FTP sites, we provide this
220- service as a goodwill gesture to the Internet community at large.
220- Except where it is explicitly stated otherwise we do not offer anything
220- obtainable here as a product of any kind, nor do we support it in any
220- way, nor do we warrant anything at all about it whatsoever, nor do we
220- recommend or endorse it.
220-
220- If you are behind a firewall your client program may have to use PASV
220- mode to fetch files from us. Contact your local support personnel for
220- information on how to do this.
220-
220 muck.dcs.ed.ac.uk ANONYMOUS ONLY FTP (Version 6 mjr/gdmr) ready.
ADAT
500 'ADAT Hi there, do you support security?': command not understood.
USER anonymous
331 Guest login ok, send ident as password.
PASS
230 Guest login ok, access restrictions apply.
SYST
215 UNIX Type: L8
PWD
257 "/usr/local/share/ftp/root" is current directory.
CWD pub/ajcd/
250 CWD command successful.
PWD
257 "/usr/local/share/ftp/root/pub/ajcd" is current directory.
PORT 18,162,2,116,218,187
200 PORT command successful.
LIST
150 Opening ASCII mode data connection for /bin/ls.
total 6000
drwxr-xr-x 2 28043 28045 512 Dec 1 1999 BBC
-rw-r--r-- 1 28043 28045 45357 Apr 10 1991 Libpbm01
-rw-r--r-- 1 28043 28045 48416 Jul 17 1991 LibpbmPC01
-rw-r--r-- 1 28043 28045 4012 Mar 15 1993 Moreverb01.gz
-rw-r--r-- 1 28043 28045 38221 Oct 7 1993 PBMtoPK01
-rw-r--r-- 1 28043 28045 27080 Oct 7 1993 PBMtoPK02
-rw-r--r-- 1 28043 28045 15582 Feb 20 1992 PKtoBDF01
-rw-r--r-- 1 28043 28045 4664 Apr 26 1993 Slides01.gz
drwxr-xr-x 2 28043 28045 512 Oct 2 1998 WinNT
-rw-r--r-- 1 28043 28045 28461 Apr 20 1999 bdftofon.tar.gz
-rw-r--r-- 1 28043 28045 173722 Mar 14 1994 dviutils.tar.Z
-rw-r--r-- 1 28043 28045 114816 Mar 9 1999 fplan-1.3.tar.gz
-rw-r--r-- 1 28043 28045 1013585 Mar 9 1999 fplan-db.tar.gz
-rw-r--r-- 1 28043 28045 423369 Mar 15 1993 guobiao.tar.Z
-rw-r--r-- 1 28043 28045 15044 Nov 28 1999 mailcheck.tar.gz
drwxr-xr-x 2 28043 28045 1024 Nov 10 1999 pbmcontrib
-rw-r--r-- 1 28043 28045 46087 Mar 15 1993 pbmcontrib.tar.Z
-rw-r--r-- 1 28043 28045 86363 Oct 7 1993 pbmtopk.tar.Z
-rw-r--r-- 1 28043 28045 104509 Nov 2 1995 psutils-p16.tar.Z
-rw-r--r-- 1 28043 28045 61657 Jul 24 1996 psutils-p16.tar.gz
-rw-r--r-- 1 28043 28045 202239 Mar 18 1997 psutils-p17-a4-nt.zip
-rw-r--r-- 1 28043 28045 104169 Mar 11 1997 psutils-p17.tar.Z
-rw-r--r-- 1 28043 28045 62039 Mar 11 1997 psutils-p17.tar.gz
-rw-r--r-- 1 28043 28045 104169 Mar 11 1997 psutils.tar.Z
-rw-r--r-- 1 28043 28045 62039 Mar 11 1997 psutils.tar.gz
-rw-r--r-- 1 28043 28045 5784 Apr 15 1998 thc.tar.gz
-rw-r--r-- 1 28043 28045 40299 Jan 14 2000 vm-pop.el
-rw-r--r-- 1 28043 28045 40890 May 4 1994 vplutils.tar.Z
-rw-r--r-- 1 28043 28045 92864 Sep 21 1999 win32lpr.zip
226 Transfer complete.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Connecting to ftp.tardis.ed.ac.uk port 21 (11/23/2000 12:55:04 PM)
220-vortis.tardis.ed.ac.uk FTP server (NcFTPd 2.0.6, registered copy) ready.
220-
220- This is the Tardis Project's anonymous-only FTP service. Please
220- address all queries/problem reports to ftp@tardis.ed.ac.uk
220-
220- For non-anonymous FTP, please use host userftp.tardis.ed.ac.uk instead.
220-
220- ALL OPERATIONS/TRANSFERS ON THIS SERVER ARE LOGGED.
220- If you disagree with this policy, please disconnect now.
220-
220
ADAT
500 Syntax error, command unrecognized.
USER anonymous
331 Guest login ok, send your complete e-mail address as password.
PASS
230-You are user #3 of 40 simultaneous users allowed.
230-
230 Logged in anonymously.
SYST
215 UNIX Type: L8
PWD
257 "/" is cwd.
CWD users/ajcd
250 "/.0/ajcd" is new cwd.
PWD
257 "/.0/ajcd" is cwd.
PORT 18,162,2,116,226,10
200 PORT command successful.
LIST
150 Opening ASCII mode data connection for /bin/ls.
drwxr-xr-x 2 ftpuser ftpusers 512 Nov 10 1999 BBC
-rw-r--r-- 1 ftpuser ftpusers 45357 Mar 20 1996 Libpbm01
-rw-r--r-- 1 ftpuser ftpusers 48416 Mar 20 1996 LibpbmPC01
-rw-r--r-- 1 ftpuser ftpusers 4012 Mar 20 1996 Moreverb01.gz
-rw-r--r-- 1 ftpuser ftpusers 38221 Mar 20 1996 PBMtoPK01
-rw-r--r-- 1 ftpuser ftpusers 27080 Mar 20 1996 PBMtoPK02
-rw-r--r-- 1 ftpuser ftpusers 15582 Mar 20 1996 PKtoBDF01
-rw-r--r-- 1 ftpuser ftpusers 4664 Mar 20 1996 Slides01.gz
drwxr-xr-x 2 ftpuser ftpusers 512 Oct 2 1998 WinNT
-rw-rw-r-- 1 ftpuser ftpusers 28461 Apr 20 1999 bdftofon.tar.gz
-rw-r--r-- 1 ftpuser ftpusers 173722 Mar 20 1996 dviutils.tar.Z
-rw-rw-r-- 1 ftpuser ftpusers 114816 Mar 9 1999 fplan-1.3.tar.gz
-rw-r--r-- 1 ftpuser ftpusers 1013585 Mar 9 1999 fplan-db.tar.gz
-rw-r--r-- 1 ftpuser ftpusers 423369 Mar 20 1996 guobiao.tar.Z
-rw-r--r-- 1 ftpuser ftpusers 15044 Nov 28 1999 mailcheck.tar.gz
drwxr-xr-x 2 ftpuser ftpusers 512 Mar 21 1996 pbmcontrib
-rw-r--r-- 1 ftpuser ftpusers 46087 Mar 20 1996 pbmcontrib.tar.Z
-rw-r--r-- 1 ftpuser ftpusers 86363 Mar 20 1996 pbmtopk.tar.Z
-rw-r--r-- 1 ftpuser ftpusers 104509 Mar 20 1996 psutils-p16.tar.Z
-rw-r--r-- 1 ftpuser ftpusers 202239 Mar 18 1997 psutils-p17-a4-nt.zip
-rw-r--r-- 1 ftpuser ftpusers 104169 Mar 11 1997 psutils-p17.tar.Z
-rw-r--r-- 1 ftpuser ftpusers 62039 Mar 11 1997 psutils-p17.tar.gz
lrwxrwxrwx 1 ftpuser ftpusers 17 Sep 12 1999 psutils.tar.Z ->
psutils-p17.tar.Z
lrwxrwxrwx 1 ftpuser ftpusers 18 Sep 12 1999 psutils.tar.gz ->
psutils-p17.tar.gz
-rw-rw-r-- 1 ftpuser ftpusers 5784 Apr 15 1998 thc.tar.gz
-rw-r--r-- 1 ftpuser ftpusers 40299 Jan 14 2000 vm-pop.el
-rw-r--r-- 1 ftpuser ftpusers 40890 Mar 20 1996 vplutils.tar.Z
lrwxrwxrwx 1 ftpuser ftpusers 13 Nov 10 1999 win32lpr.zip ->
WinNT/lpr.zip
226 Listing completed.