ITEM: DU4881L
Too many header pages with multiple copy print
ENV:4.2.1 and all other operating systems.
PROBLEM:Getting banner page with every copy of job coming out printer
Response: Wrote this HOWTO and emailed to customer
Priting a single header page
with multiple copy print jobs
The customer uses the command "lp -d \ -n25 \ to print. The
queue is setup to print either a header for each job or for each group of
jobs. When the print job get sent to the printer, there is a header page
with each of the 25 jobs. How can this be prevented?
Why multiple headers?
In the virtual printer subsystem, each copy is sent through the entire
virtual printer pipeline. This means that the filters, header programs, and
formatter will be run once for each copy.
What can be done about this
The sh attribute controls the header pages. By using an internal variable,
and an if-then construct, the virtual printer can be made to print only a
single copy of the header page.
Procedure
This procedure should work for all releases of the operating system to date.
Follow these steps:
1. Create any virtual printer in the normal way.
2. Modify the virtual printer with lsvirprt
lsvirprt
Choose the queue
3. From the main command menu use the sh tilde v command to edit the sh
attribute with a vi like editor.
To CHANGE an attribute value, enter AttributeName=NewValue
To FORMAT and EDIT an attribute value, enter AttributeName~v
To EDIT the attribute file, enter ~v
To terminate, press Enter: sh~v \
4. This will give a screen that begins:
Pipeline for Header Page
sh = %Ide/pioburst %F[H] %Idb/H.ascii | %Ide/pioformat -@ %Idd/%Imm -!%Idf/piofp
cl -J+ -L! %IsH -u%IuH
%Ide INCLUDE: (Directory Containing Miscellaneous Modules)
'/pioburst '
%F[H] If "-H] Argument" on Command Line, "-\# Argument" -> OUTPUT
' '
5. Add the following entry before the %Ide line.
%?
%gb
%!
%t
%{1}
%Pb
6. Then go to the end of the file and add this line:
%;
7. Save the file, and then come back in to the edit again.
8. The file should now read
Pipeline for Header Page
sh = %?%gb%!%t%{1}%Pb%Ide/pioburst %F[H] %Idb/H.ascii | %Ide/pioformat -@ %Idd/%
Imm -!%Idf/piofpcl -J+ -L! %IsH -u%IuH%;
%?
%gb PUSH: (Internal Variable b)
%! PUSH: (! pop) -- Unary Negation
%t
%{1} PUSH: (Integer Constant 1)
%Pb POP -> Internal Variable b
%Ide INCLUDE: (Directory Containing Miscellaneous Modules)
'/pioburst '
%F[H] If "-H] Argument" on Command Line, "-\# Argument" -> OUTPUT
' '
%Idb INCLUDE: (Directory Containing Header and Trailer Text Files)
'/H.ascii | '
%Ide INCLUDE: (Directory Containing Miscellaneous Modules)
'/pioformat -@ '
%Idd INCLUDE: (Directory Containing Digested Data Base Files)
'/'
%Imm INCLUDE: (File Name Of (Digested) Data Base; Init. By
"piodigest" (mt.md.mn.mq:mv))
' -!'
%Idf INCLUDE: (Directory Containing Loadable Formatter Routines)
'/piofpcl -J+ -L! '
%IsH INCLUDE: (FORMATTING FLAGS for header page)
' -u'
%IuH INCLUDE: (Input PAPER TRAY for header page)
%;
~
9. Exit the edit session, and the virtual printer
10. Test
The logic
The logic of the statements that were added are:
If the internal variable b (name b is arbitrary) has no value, then:
* Assign it a value for the pass on the next copy
* Run the pipeline of header page programs Else do nothing
This was tested at AIX 3.2.5 and AIX 4.2.1 and works equally
well at either.
Support Line: Too many header pages with multiple copy print ITEM: DU4881L
Dated: October 1997 Category: N/A
This HTML file was generated 99/06/24~13:30:15
Comments or suggestions?
Contact us