Printing Text 2-Up and Landscape in AIX
Contents
About this document
Example of what is meant by 2-Up
Text to a PostScript queue with enscript
Text to a text queue with the pr filter
PostScript to a PostScript queue with psnup
Setting up a 2-Up queue with a filter
This document describes how to create an AIX queue to print 2-up. The
2-up queue places two pages of print information on a single sheet of
paper. The paper is rotated to landscape so that both pages appear
side by side. Examples are provided for handling both text and
PostScript files.
This document applies to all levels of AIX.
Example of what is meant by 2-Up
The output will be rotated, small and look something like this:
+--------------------------------------------------------+
| page one on this side
Page two on this side +
| page one on this side
Page two on this side +
| page one on this side
Page two on this side +
| page one on this side
Page two on this side +
| page one on this side
Page two on this side +
| page one on this side
Page two on this side +
| page one on this side
Page two on this side +
| page one on this side
Page two on this side +
| page one on this side
Page two on this side +
| page one on this side
Page two on this side +
| page one on this side
Page two on this side +
| page one on this side
Page two on this side +
+--------------------------------------------------------+
Text to a PostScript queue with enscript
Perhaps the easiest way to get a nice-looking 2-up output for ASCII text
is by printing with enscript to a PostScript queue as shown in this example.
The -2 indicates 2-up, the r is for rotate, and the G is for Gaudy
which adds some page numbers and other trim.
-
enscript -2rG -dsp filename
Text to a text queue with the pr filter
Another way to easily generate 2-up output is to use the pr filter that
comes with AIX. The following is a sample command that will generate
2-up text output for a PCL laser printer queue. The -l 60 specifies
the length per page, the -w 172 specifies the width, and the -2 tells
pr to format the file 2-up. The qprt -z+ flag is used to make the
printer print landscape. We use the passthrough flag because pr will
add carriage returns to the line feeds already.
-
pr -l 60 -w 172 -2 filename | qprt -z+ -dp -p17splp
PostScript to a PostScript queue with psnup
With PostScript files, the options are more limited. Many applications
give the ability to create 2-up output. An example of a program that
will let you do this is Freelance Graphics in Windows. Sometimes
you have a PostScript file that is already created and you want to print
that 2-up. The psnup utility was designed just for this purpose.
This utility is not shipped with AIX, but is available from a number of
UNIX shareware sites as well as included in the CD-ROM from the O'Reilly
book, "UNIX Power Tools". From IBM puborder, this is SR28-4965.
The command syntax may vary based on the application generating the output.
The following is an example command:
-
psnup -w280 -2 filename | pqrt -Pps (Shareware)
Setting up a 2-Up queue with a filter
The following example shows how to set up the pr filter in an AIX virtual
printer to create a 2-up text queue. Similar changes could be made
to add an enscript 2-up queue.
-
Create any ASCII text queue called txt2up
-
Type: lsvirprt
-
Select the txt2up queue
-
Type: z=+ to rotate the output
-
Type: p=17 to put printer in pitch 17
-
Type: f=p to have queue use pr filter
-
Type: fp~v To enter vi edit session of fp attribute
-
Change the screen to show this:
'pr' filter
fp = -l 60 -w 172 -2 %F[h] %I@1
' -l 60 -w 172 -2 '
%F[h] If "-h] Argument" on Command Line, "-# Argument" -> OUTPUT
' '
%I@1 INCLUDE: (Path Name of File Being Printed)
~
-
Type: fp, which should show:
Name Description Value
fp 'pr' filter pr -l 60 -w 172 -2
%F[h] %I@1
[ Doc Ref: 91884980712780 Publish Date: Mar. 29, 2001 4FAX Ref: 6453 ]