OUTPUT |
Top Previous Next |
Syntax
output "output-device" | {expression}
Description
The output keyword is used to modify the output device of any copy. Normally, all copies are printed to the output device specified in the "-o" option, or to standard out on UNIX. However, it is sometimes desirable to have copies of forms sent to different devices, such as a different laser printer, or a fax product.
The output-device can be a printer device, a pipe or re-direct (starting with | or >), or a filename. Beware of pipes or redirects on UNIX, noting that any shell-aware characters, such as ampersands (&), must be quoted.
If an expression syntax is used, it is evaluated after each page of input has been loaded and the prepage subroutine has been executed.
When used inside an if copy block, the output for that copy only is changed. Note that this feature is only supported in the pcl and postscript drivers. When using the pdf driver, any change to output for different copies is ignored.
The "output$" variable can also be set in a code block for equivalent results.
Example:
if copy 2 output "|lp -daccounting -s" end if
The above example would send the second copy of the form to the printer named "accounting".
Drivers: pcl, ps; pdf only for a job-wide specification outside of "if copy" blocks as PDF output cannot be changed during printing.
|