Printer information files (UNIX only)

The directory where printer information files are stored is $BSE/lib/printinf.

Create a subdirectory in the printinf directory. The name of the subdirectory must be the first letter of the future printer information file.

The printer information file is stored in this subdirectory. For example, the printer information file for a Mannesmann mt910 is stored in the $BSE/lib/printinf/m/ directory.

The name of the file itself is an abbreviation of the printer name, for example, mt910.

You can include another printer information file at any position in the current file with the Include command, for example, include=mt910.

The variables are filled in accordance with the specifications (escape sequences) of the printer as listed in the Printer Manual. You can omit some of these variables, because these variables are not required for the majority of the applications. These variables are marked with an asterisk (*).

A variable definition consists of a name, a =, an escape sequence that contains special characters and a comma. A new line character closes the lines.

If a printer does not offer an escape sequence for boldface and underlined text, and the specific variables are left empty, the filter program simulates these functions by backspace and carriage return. The positions are then covered twice. To switch this simulation off, you can enter the value \000 for the definition of bold on/off or underline on/off, or simply enter no value, for example, pbold=,.

The escape sequences can contain special characters and can be divided into escape codes and control codes, as described in the following table:

Escape codes Control codes
\b backspace ^A to ^Z
\E or \e escape ^[
\f form feed ^\
\n newline ^]
\r carriage return ^^
\t tab ^_
\s space
\nn decimal value nn=1-255
\0nn octal value nn=1-377
\xnn hexadecimal value nn=1-FF (for example \x1F)

You can use an octal value instead of an alphabetical representation. For example, “escape” then becomes \033.

The control codes are converted to the ASCII codes 1 to 31. For example, ^B equals the ASCII character with decimal value 2 (STX).

A printer information file can have these Boolean entries:

  • rsf_pbold, reset font after pbold
  • rsf_prev, reset font after prev
  • rsf_punder, reset font after punder
  • rsf_pobold, reset font after pobold
  • rsf_porev, reset font after porev
  • rsf_pounder, reset font after pounder

A printer information file can have these variables:

  • barcode_dir=

    Barcode directory, relative to $BSE/lib/barcode.

  • bin1=

    Select first paper bin.

  • bin2=

    Select second paper bin.

  • bin3=

    Select third paper bin.

  • bin4=

    Select fourth paper bin.

  • hpos=

    Set horizontal cursor position of the printer.

  • initpage=

    String sent before each page.

  • initpr=

    Initialization string that precedes the output to the printer. This variable must be filled with the codes for large typeface.

  • initprog=X

    The output of program X (full path name) is sent to the printer.

  • initpr2=

    The second initialization string sent after initprog.

  • landscape=

    Select landscape printing.

  • large=

    Large typeface (10 cpi) control. Some printers require a code to change the typeface size.

  • nls_out=

    NLS output table name.

  • middle=

    Medium typeface (12cpi) control. Some printers require a code to change the typeface size.

  • To set the print color, use these codes:

    • p_black=

    • p_red=

    • p_green=

    • p_yellow=

    • p_blue=

    • p_magenta=

    • p_cyan=

    • p_white=

  • pbold=

    Print boldface characters. A boldface character can print wider than normal. This does not imply any proportional spacing.

    Printing graphic characters, with ASCII code over 127 decimals, yields additional line feeds on most Mannesmann printers. If you do not use this variable, the bshell uses the carriage return character to reprint each line to simulate boldface printing.

  • pcbl=

    Print +. If this variable cannot be filled, for example, because the printer cannot print the character, a + is used.

  • pcbr=

    Print +. If this variable cannot be filled, for example, because the printer cannot print the character, a + is used.

  • pctl=

    Print +. If this variable cannot be filled, for example, because the printer cannot print the character, a + is used.

  • pctr=

    Print +. If this variable cannot be filled, for example, because the printer cannot print this character, a + is used.

  • pdbl_wide=

    Double-wide mode on.

  • pdt=

    Print –. If this variable cannot be filled, for example, because the printer cannot print the character, a + is used.

  • pfont1=, to pfont16=

    Select font 1 to font 16. These fonts are user definable.

  • phb=

    Print –. If this variable cannot be filled, for example, because the printer cannot print the character, a – is used.

  • pitalic=

    Italic mode on.

  • pkr=

    Print +. If this variable cannot be filled, for example, because the printer cannot print the character, a + is used.

  • plt=

    Print |. If this variable cannot be filled, for example, because the printer cannot print the character, a + is used.

  • pnlq=

    NLQ mode on.

  • pobold=

    Switch off boldface printing without affecting character size.

  • podbl_wide=

    Double-wide mode off.

  • pofont1=, to pofont16=

    Deselect font 1 to font 16. These fonts are user-definable.

  • poitalic=

    Italic mode off.

  • ponlq=

    NLQ mode off.

  • porev=

    Reverse mode off.

  • portrait=

    Select portrait printing.

  • posubscript=

    Subscript mode off.

  • posuperscript=

    Superscript mode off.

  • pounder=

    Underlined printing off.

  • prev=

    Reverse mode: white on black.

  • prt=

    Print |. If this variable cannot be filled, for example, because the printer cannot print this character, a + is used.

  • psubscript=

    Subscript mode on.

  • psuperscript=

    Superscript mode on.

  • punder=

    Print underlined characters. If this variable cannot be filled, the bshell prints underscore characters on the next line to simulate underlining.

  • put=

    Print –. If this variable cannot be filled, for example, because the printer cannot print the character, a + is used.

  • pvb=

    Print vertical bar. If this variable cannot be filled, for example, because the printer cannot print the character, a | (pipe) is used.

  • q1=, to q13=

    You can use these thirteen variables with strings that specify whether a character must be printed in double width, italicized, and so on. The variables are userdefinable. These codes have been replaced and will be removed in a future release.

  • resetpr=

    Resets the printer. The string is sent to the printer after all output. Specify this variable with a form feed (\014) followed by the large typeface codes.

  • resetprog=X

    The output of program X, full path name is sent after the reset string.

  • resetpr2=

    The second reset string, sent after resetprog.

  • set0=, to set9=

    Set a character set of the printer. The default set is set0.

  • small=

    Small typeface (16.66-17 cpi) control. Some printers require a code to change typeface size.

  • usr1=, to usr16=

    Define user entry1 to user entry16.