BrailleMaster Resource Page

Printer Control File

In order for BrailleMaster to be able to interface to a particular Braille printer, it needs to know what codes the printer uses to print Braille signs.

This information is specified by the contents of the Control File. The Control File also includes default formatting commands such as page length, line length, margins, etc. The structure of the Control File and the syntax of the individual commands is explained in this chapter.

Braille Characters and Printer Codes

The relationship between Braille characters and printer codes is entirely user-definable.

The text in the Control File consists of three types of lines: Code Definition Lines, Command Lines and Comment Lines.

The Code Definition Lines are used to define the code for the output device.

The Command Lines provide BrailleMaster with initial text formatting information, such as page length, margin width, etc.

The Comment Lines always start with a semicolon and are ignored by BrailleMaster. They are there for your convenience, allowing the user to include remarks and explanations within the Control File.

Printer Code Definition

Each Code Definition Line consists of two parts: The Braille code at the start of the line and the output device code at the end. Each line represents a relationship between a certain Braille code and a corresponding output device code.

The Braille Part of the Code Definition Lines specifies the Braille code. Each of the 64 Braille codes (including space) must be represented. The codes can be shown in one of two possible ways: Either as sequence of digits, say 125 for Dot 1,2,5; or as a mixed sequence of dashes and asterisks. Such a sequence simulates keys on a Braille keyboard: An asterisk represents a depressed key while a dash represents a released key. The sequence of Braille dots on a Braille keyboard is 3-2-1-4-5-6. For example, Dot 1,2,5 can be also shown as -**-*- .

Each Code Definition Line line contains only a single Braille code. This means that an exact total of 64 Code Definition Lines is necessary for a definition of a complete output code set for a printer or a Braille embosser.

Each Braille code must be followed by a corresponding output device code. The output device code can be defined in three possible ways: A character surrounded by single or double quotation marks, a group of digits representing a decimal number, or a hexadecimal number preceded by "#". (A "hash" sign.) These numbers correspond to the output device ASCII code.

For example, if the Braille character Dot 1,2 is produced by sending the character "B" to the Braille printer, the corresponding Code Definition Line could look like this:

12 "B"


-**--- "B"

Alternatively, using the ASCII numerical code, the above line could be replaced by one of these:

-**--- #42
-**--- 66

The following six Code Definition Lines are equivalent:

-**--- "B"
-**--- #42
-**--- 66
12   "B"
12   #42
12   66

Note that the Space character must be also defined. In most cases, the definition would be one of these:

0      " "
------ " "
------ 32
------ #20

Ink Printers and Dip'n'Dot Embossers

There is a special case where Code Definition Lines are absent in the Control file. This situation arises if the specified output device is an ordinary ink printer or a "dip'n'dot" type embosser. In both these situations Braille codes are produced by the printing head having to pass three times for each line of Braille characters, printing dots rather than complete characters on each pass. In such case, BrailleMaster performs the necessary splitting of each line into three sub-lines automatically.

The simple absence of the Code Definition Lines in the Control file will make BrailleMaster assume that the output device is of the dip'n'dot type.

BrailleMaster allows the definition of "dots" and "dips" which form Braille characters, as well as the definition of spaces which separate them. The appropriate device control codes are described in the following chapter.

Changing Default Printer Parameters

A Command Line of the Control file serves to inform BrailleMaster of some special properties of the particular output device you are using, or to establish the default format in which the translated Braille should be formatted.

Each Command Line can either contain a command code or a variable with a parameter. An example of a Command Line containing a command code is as follows:


"RP" stands for "reverse printing". Inclusion of this Command Line into the Control File will mean that the text will be sent to the printer starting from the end of each line. (Some Braille embossers require this as the hammer hits the paper from above rather than from underneath. This is a common feature of most dip'n'dot embossers. It is also very useful for languages which are printed from right to left.)

Following is an example of a Control Line containing a variable with a parameter:


"PL" stands for "page length". This command informs BrailleMaster that the Braille page is 25 lines long.

Not all variables available in BrailleMaster need to be defined in the Control File. BrailleMaster has all the variables predefined to commonly used default values. These default values are listed in the Appendix F.

The Command Lines can be placed anywhere within the Control File; they can be inserted even within Code Definition Lines. However, to simplify future modifications, it is advisable to define all Command Lines at the start of the Control File, followed by a complete set of Code Definition Lines (see examples at the end of this chapter).

The entire list of available command codes for inclusion in the Control file is as follows:

RP    Reverse Print. Causes the Braille to be printed from right to left. Normally, Braille is printed from left to right.

ID    Include Dot Commands. Inclusion of this instruction causes BrailleMaster to include text lines starting with a dot. Normally, lines which start with a dot are ignored so that text produced originally for a Wordstar compatible word processor (such as the Eureka A4 word processor) can be processed by BrailleMaster without any modification.

OP    Omit Page Numbering. Normally, printed pages are numbered starting from one. Using this command will suppress page numbering. (Note that this command can be overridden by "Star Commands" included in the original text, as will be explained later.)

CA    Capitals. This command will instruct BrailleMaster to preserve capitals in the original text. Normally, capitals are ignored to conserve space and all text is assumed to be in lower case. This command can be also overridden by an appropriate Star Command as will be explained later.

LP    Preserve last page. Normally, last page is ejected from the output device at the end of each print, even if there is just a single line of text. This feature can be overridden by including the LP command into your Control file. If this command is included then next printing resume just after the previous text. (Note however, that if BrailleMaster was instructed to print footers at the end of each page, the LP command will have no effect, since BrailleMaster will consider a page completed only after a footer has been printed at the bottom.)

IE    Ignore error. Normally, if BrailleMaster encounters a Star Command error within a text file, the error is announced and printing will stop. By including this command, the error will still be announced but the printing will continue.

To illustrate the usage of the control codes, let us have a simple example: Say we wish to instruct BrailleMaster to print in reverse and preserve capitals in the original text. To satisfy these requirements, using the above-described commands, we would need to include the following two lines into the control file:


Apart from control codes which do not include a variable parameter, there are several Command Lines which require numeric parameters. These represent certain default values for Braille text formatting.

LL    Line Length. Specifies the number of characters per line.

PL    Page Length. Specifies the number of lines per page.

LM    Left Margin. Specifies the overall indentation of the Braille text.

PI    Paragraph Indent. Specifies the additional indentation (number of spaces) at the first line of each paragraph.

TA    Tab Stop. A number following this variable specifies the distance between tab stops.

For example, to set the Braille page to 24 line length of 40 characters per each line, we need to include the following two commands into the Control File:


Note the equal sign separating the variable code and the parameter.

Another group of Control File commands makes it possible to directly control the output device. These are the following:

IN    Initialize printer. This code should be followed by a string of data to be output to a printer or a Braille embosser before each print. There can be any number of such initialization commands in a control file, allowing to output long initialization sequences to an output device, for example to define Braille dots as user-downloadable graphic characters for printing visible Braille on a dot matrix or a laser printer.

Examples of syntax of the initialization string are:

IN=27,34,15,128 (The codes sent to a printer are represented as decimal numbers).

IN=#1E,#22,#0F (The initialization codes are represented as hexadecimal numbers).

IN="A","B","C" (A,B,C characters are output before start of each print.)

All three types of code specifications can be mixed in one line.

RS    Reset printer. This is similar to the above command, with the difference that the string following the RS code will be sent to the output device AFTER each print. It is a good practice to include this command and "clean the printer up" after use, especially if it has been initialized for some special graphic mode.

DE    The Device type command makes it possible to select different printer devices on the IBM PC. The usage is DE=1 for LPT1, DE=2 for LPT2, etc. Please note that this command must be placed in the Control File before the IN command. (This is because the IN command writes to the currently selected device immediately.)

The following group of control commands makes it possible to specify codes for certain control functions of the output device:

DT    "Dot" code. For dip'n'dot type of Braille embossers or for graphic printing of Braille, this variable makes it possible to define a character or a string of codes which need to be output to the output device to produce a dot.

DP    "Dip" code. Similarly to the above, this variable defines a character or a string of codes which represent a "dip" in the Braille output. (A Braille character consists of "dots" and "dips".)

DS    "Dot Space" code. This is a code which will be output instead of a "no-dot" in a space character. In fact, two DS codes will be output for each space. The separation of the DS and the DP codes makes it possible to distinguish "no-dots" in Braille characters and spaces separating words. This is useful for example when printing Braille graphically on a dot matrix printer.

SP    "Space" code. This character or string defines a code or string of codes to advance the printing head of the output device to the next Braille character.

CR     "Carriage return" code. Defines a code or a string of codes to move the carriage to the start of the line.

LF    "Line feed" code. Defines a code or a string of codes to move the carriage down from one line of Braille codes to another.

RF    "Row Feed" code. Defines a code or a string of codes to move the carriage down from one row of dots to another. This is especially used for dip'n'dot printers in case different spacing is required between the rows of dots within a single line of Braille codes, and the lines themselves.

FF    "Form feed" code. Defines a code or a string of codes to move to the next sheet of Braille paper.

A simple example of all the above would be a Control File instructing a conventional dot matrix printer to print Braille in a visual form. In the following example, "dots" will be shown as asterisks, "dips" and "spaces" will be ordinary space characters, carriage return, line feed and form feed will be represented by conventional ASCII codes:

DP=" "
SP=" "

The following examples show the contents of typical Control Files.

Plain Vanilla Control File

This simple Control File is suited for most Braille embossers.

Note that there are no special control commands included in this file, except for the definition of the printer characters for individual Braille codes: For every Braille code, there must be a printer character specified. All other formatting variables, such as page and line length, rely on BrailleMaster default values.

Also note that a semicolon at the start of line denotes a comment, to be ignored by the program. You can include your own explanatory comments about what each line means.

;plain vanilla Braille embosser
--*--- 'A'
-**--- 'B'
--**-- 'C'
--***- 'D'
--*-*- 'E'
-***-- 'F'
-****- 'G'
-**-*- 'H'
-*-*-- 'I'
-*-**- 'J'
*-*--- 'K'
***--- 'L'
*-**-- 'M'
*-***- 'N'
*-*-*- 'O'
****-- 'P'
*****- 'Q'
***-*- 'R'
**-*-- 'S'
**-**- 'T'
*-*--* 'U'
***--* 'V'
-*-*** 'W'
*-**-* 'X'
*-**** 'Y'
*-*-** 'Z'
****-* '&'
****** '='
***-** '('
**-*-* '!'
**-*** ')'
--*--* '*'
-**--* '<'
--**-* '%'
--**** '?'
--*-** ':'
-***-* '$'
-***** ']'
-**-** '\'
-*-*-* '['
-*---- '1'
**---- '2'
-*--*- '3'
-*--** '4'
-*---* '5'
**--*- '6'
**--** '7'
**---* '8'
*---*- '9'
*---** '0'
*--*-- '/'
*--*-* '+'
*--*** '#'
*--**- '>'
*----- '"'
*----* '-'
---*-- '@'
----*- '''
---**- '^'
---*** '_'
---*-* '.'
----** ';'
-----* ','
------ ' '

A typical addition to the above Control File could be the definition of a line length and page length.

For example:

;set line length to 40
;set page length to 24

These lines could be added anywhere within the Control File, but it is a nice convention to show them at the start of the file, preceding the above printer character assignments.

Dots and Stars

This Control File prints Braille in a visual form, as a series of dots and stars on in visual form.

;prints Braille as a sequence of dots and stars
;on EPSON-compatible dot matrix printers
;reset printer
;define gap as '.'
;define dot as '*'
;define line feed as two row feeds
;define line length

Note that the control codes are not case sensitive, so it is possible to use


as well as


Home | Overview | Tutorial | Q&A and Tips | Louis Braille Memorial
Software Downloads | User Registration | Contacts

Copyright © 2009 Robotron Group