Go to the first, previous, next, last section, table of contents.


Controlling Printers Attached to Terminals

Some terminals have attached hardcopy printer ports. They may be able to copy the screen contents to the printer; they may also be able to redirect output to the printer. Termcap does not have anything to tell the program whether the redirected output appears also on the screen; it does on some terminals but not all.

`ps'
String of commands to cause the contents of the screen to be printed. If it is absent, the screen contents cannot be printed.
`po'
String of commands to redirect further output to the printer.
`pf'
String of commands to terminate redirection of output to the printer. This capability must be present in the description if `po' is.
`pO'
String of commands to redirect output to the printer for next n characters of output, regardless of what they are. Redirection will end automatically after n characters of further output. Until then, nothing that is output can end redirection, not even the `pf' string if there is one. The number n should not be more than 255. One use of this capability is to send non-text byte sequences (such as bit-maps) to the printer.

Most terminals with printers do not support all of `ps', `po' and `pO'; any one or two of them may be supported. To make a program that can send output to all kinds of printers, it is necessary to check for all three of these capabilities, choose the most convenient of the ones that are provided, and use it in its own appropriate fashion.


Go to the first, previous, next, last section, table of contents.