File:  [Research Unix] / researchv10no / cmd / postscript / postreverse / postreverse.1
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

.TH POSTREVERSE 1
.SH NAME
.B postreverse
\- reverse the page order in a PostScript file
.SH SYNOPSIS
\*(mBpostreverse\f1
.OP "" options []
.OP "" file []
.SH DESCRIPTION
.B postreverse
reverses the page order in files that conform to Adobe's
Version 1.0 or Version 2.0 PostScript file structuring conventions,
and writes the results on the standard output.
Only one input
.I file
is allowed and if no
.I file
is specified, the standard input is read.
The following
.I options
are understood:
.TP  0.75i
.OP \-o list
Select pages whose numbers are given in the comma-separated
.IR list .
The list contains single numbers
.I N
and ranges
.IR N1\-\|N2 .
A missing
.I N1
means the lowest numbered page, a missing
.I N2
means the highest.
.TP 
.OP \-r
Do not reverse the pages in
.IR file .
.TP 
.OP \-T dir
Use
.I dir
as the temporary file directory when
reading from the standard input.
By default
.I dir
is set to
.MR /tmp .
.PP
.B postreverse
can handle a limited class of files
that violate page independence,
provided all global definitions are bracketed by
.MW %%BeginGlobal
and
.MW %%EndGlobal
comments.
In addition, files that mark the end of each page with
.MW "%%EndPage:\ label\ ordinal"
comments will also reverse properly, provided the prologue and
trailer sections can be located.
If
.B postreverse
fails to find an
.MW %%EndProlog
or
.MW %%EndSetup
comment the entire
.I file
is copied, unmodified, to the standard output.
.PP
Since global definitions are pulled out of individual
pages and put in the prologue, the output file can be
minimally conforming, even if the input
.I file
was not.
.SH EXAMPLES
Select pages 1 to 100 from
.I file
and reverse the pages:
.EX
postreverse -o1-100 \f2file
.EE
Print four logical pages on each physical page
and reverse all the pages:
.EX
postprint -n4 \f2file\fP | postreverse
.EE
Produce a minimally conforming file from output
generated by dpost without reversing the pages:
.EX
dpost \f2file\fP | postreverse -r
.EE
.SH DIAGNOSTICS
A 0 exit status is returned if
.I file
was successfully processed.
.SH BUGS
No attempt has been made to deal with redefinitions of global
variables or procedures.
If standard input is used, the input
.I file
will be read three times before being reversed.
.SH SEE ALSO
.BR dpost (1),
.BR postdaisy(1),
.BR postdmd(1),
.BR postio(1),
.BR postmd(1),
.BR postprint(1),
.BR posttek(1),
.BR psencoding (1)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.