Printing Utility
by Graham Crow

When run, BPrint adds an icon to the icon bar. Clicking Select on the icon bar icon opens the main program window. Dragging a file icon from a directory viewer to the icon bar icon or the window will result in the file's details being displayed in the window. The window is split into six sections. The first is the file information section. This section contains icons which display the pathname, filetype and length of the selected file.

If the file is a Basic program (filetype &FFB), the line numbers of the first and last lines are also shown. These numbers are also entered into writeable icons in the second section which can be edited to restrict the portion of the program that is printed.

The third section contains icons which allow the style, size and density of the print to be controlled. The options available are Pica/Elite pitch, Condensed, Enlarged, Double strike and Emphasised. Some of these options may be mutually exclusive, depending on the type of printer used.

The fourth section contains icons which allow the print format to be set. The options available are Linefeeds (otherwise just carriage returns will be sent), LISTO 3 (performs indentation on Basic programs), Lines per page, Perforation skip, Left margin and Lines per inch. Linefeeds and LISTO 3 affect the Print file option, while the others affect the Send codes option. Each output line is terminated by a carriage return, followed by a linefeed if linefeeds are enabled. Lines of text files are similarly terminated, regardless of whether the text file used linefeeds, carriage returns or both.

The fifth section allows up to four sets of user-defined codes to be entered, each accompanied by a description. The program is initially configured with suitable example values. The user options are toggled on and off with the option icons. The final part of the section allows the multi-column printing utility PCol to be accessed. When the PCol option icon is on, printing a Basic program will result in PCol being called with the number of columns being determined by the value in the Columns icon (maximum value 9).

The sixth section contains four action icons. Send codes sends the selected codes to the printer in the following order: Pica/Elite, Condensed, Enlarged, Double strike, Emphasised, Lines per page, Perforation skip, Left margin, Lines per inch and finally the user codes in the order Italics, Squashed, NLQ, blank (default values).

Reset printer sends an Esc-@ sequence to the printer placing it in its default state. This is useful to ensure that any unwanted codes are cleared before making any new settings.

List file displays the file on the screen. Paged mode is enabled, so pressing Shift scrolls the text, while pressing Escape aborts. Basic programs are listed using !BPrint.List, which calls the BList utility (from RISC User Volume 2 Issue 5), while text files are listed using !BPrint.Type, which uses *Type. Note that any file other than a Basic program (filetype &FFB) is treated as text.

Print file begins printing in the background using the current settings. Note that no escape sequences are sent to the printer. This must be done manually by selecting the Send codes option. Printing can be aborted by pressing Escape or choosing Stop from the icon bar menu. Note that it may take a while for the printer buffer to empty.

If PCol is selected, then all other settings are overridden. PCol does not work in the background and can only print the entire program. Escape must be used to abort printing.

Clicking Menu over the icon bar icon displays a menu containing four entries. Info leads to the usual 'About this program' dialogue box. Defaults leads to a submenu containing Load and Save entries. When BPrint is run, or the Load option is chosen, the settings contained in !BPrint.Defaults are loaded. Choosing the Save option saves the settings to !BPrint.Defaults.

Choosing the Stop option, which is greyed out unless a file is being printed, aborts the current print job. Finally, Choosing Quit terminates the program.
