ubprint – print text with attributes
ubprint -[P* a* d f* p* rate# r t* wp z] <files>
ubprint reads files and prints them with embedded attributes for display or printing. ubprint recognises two command structures ‘.’ commands (lines starting with ‘.’) and ‘@@’ attributes (lines ending with ‘@@’ are followed by a line of codes). Text is passed through otherwise unchanged.
Printer attributes are stored in separate files per printer in the directory ‘/usr/lib/ub/printers’. While this is a break with the rest of UNIBASE which uses terminfo, it is necessary because some printers output ‘\0’ as part of the control commands and terminfo cannot store strings with embedded ‘\0’.
The format of the printer files can be found in printers(4). How to use attributes is also described in printers(4).
<P> <TABLE WIDTH=”100%” BGCOLOR=”#000000″> <CAPTION>COMMAND LINE OPTIONS</CAPTION> <TR><TD> <TABLE WIDTH=”100%” BGCOLOR=”#FFFFFF”> <TR> <TH>OPTION</TH> <TH>DESCRIPTION</TH> </TR> <TR> <TD>-a attribute</TD> <TD> The string to cause the printer to change attributes to attribute is output immediately. This cannot be used in conjunction with the file printing. It is analogous to the tput(1) commpand for terminals. <P> e.g. <PRE>BIN1=`ubprint -a bin1 -p hplaser`</PRE> </TD> </TR> <TR> <TD>-d debug</TD> <TD> This gives a debug output. As ubprint reads the Data Dictionary and screen format each line is echoed to the screen. In this way the exact point at which an error occurs can be observed and corrected. </TD> </TR> <TR> <TD>-f font</TD> <TD> Print the file using font. The attribute string for font is output after initalising the printer and before printing the files. <P> e.g. <PRE>cat file | ubprint -f elite -p epson | lpr</PRE> </TD> </TR> <TR> <TD>-p printer</TD> <TD>This is the name of a printer file in the directory ‘/usr/lib/ub/printers’. If this argument is not given, ubprint uses the TERM environment variable. </TD> </TR> <TR> <TD>files</TD> <TD> files is a list of files to print. If files is omitted or ‘-‘ is encountered in the list of files, stdin is used as the file to print. </TD> </TR> </TABLE> </TD></TR> </TABLE> <P> <h2>DOT COMMANDS</h2> .SN variable The string for variable is sent immediately. <P> <h2>SEE ALSO</h2> printers(4) <P> <h2>SPECIAL ATTRIBUTES</h2> <PRE> INIT RESET LINES </PRE>