Progress
Client Deployment
Guide


Configuring a Printer

Many printers have a set of control sequences that you can use to specify different print characteristics, such as compressed printing or italics typeface. These control sequences often involve special characters that can be represented by their octal (base 8) equivalent. To denote these octal codes, precede the three octal digits with an escape character. On UNIX, the escape character is a tilde (~) or a backslash (\). Table 7–1 lists the standard control sequences using a tilde as the escape character.

Table 7–1: Standard Printer Control Sequences
Sequence
Interpreted as
Comments
~nnn
Single character
Use to send a single character to the printer, where nnn is an octal code between 000 and 377. You must specify all three digits.
~t
Tab character
Use to send the 011 octal code to the printer.
~r
Carriage return
Use to send the 015 octal code to the printer.
~n
Line feed
Use to send the 012 octal code to the printer.
~E
Escape
Use to send the 033 octal code to the printer.
~b
Backspace
Use to send the 010 octal code to the printer.
~f
Form feed
Use to send the 014 octal code to the printer.
~"
"
Use within quoted strings as an alternative to two quotes ("").
~\
\
Use to send the backslash character to the printer.
~~
~
Use to send the tilde character to the printer.

The PUT statement with the CONTROL option allows you to specify a control sequence that you want to send to a printer. The PUT statement has the following syntax:

PUT [ STREAM stream-name ] 
  CONTROL "ctrl-sequence" "ctrl-sequence" ... 

In the following example, the control sequence ~017 turns on the compressed printing feature of the current print device:

PUT STREAM a CONTROL "~017". 

The control sequences sent to the output destination do not affect the current line, page counters, and positions maintained within Progress. For more information about the PUT CONTROL statement, see the Progress Language Reference.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095