dvips: Paper trays
4.3 Paper trays
===============
Some printers, such as the Hewlett-Packard HP4si, have multiple paper
trays. You can set up Dvips to take advantage of this using the
'bop-hook' PostScript variable (⇒PostScript hooks).
For example, suppose you have an alternate tray stocked with
letterhead paper; the usual tray has the usual paper. You have a
document where you want the first page printed on letterhead, and the
remaining pages on the usual paper. You can create a header file, say
'firstletterhead.PS', with the following (PostScript) code ('bop-hook'
is passed the current physical page number, which starts at zero):
/bop-hook { dup 0 eq { ALTERNATETRAY } { NORMALTRAY } ifelse } def
where ALTERNATETRAY and NORMALTRAY are the appropriate commands to
select the paper trays. On the 4SI, ALTERNATETRAY is 'statusdict begin
1 setpapertray end' and NORMALTRAY is 'statusdict begin 0 setpapertray
end'.
Then, include the file with either
* the '-h' command-line option (⇒Option details); or
* the 'h' config file option (⇒Configuration file commands);
or
* '\special{header=FILE}' in your TeX document (⇒Including
headers from TeX Including headers from TeX.).