Live, Interactive Training (by Appointment only)

Home > STUREC Help > Printer Control Codes
 
Stan Campsmith Printer Control Codes

Stanwood Campsmith,
Network Administrator, MicroData Systems, Ltd.


Printer Control Codes (sometimes called Printer Strings) are the codes or symbols used by the program to communicate with your printer. They may be similar or very different for different printers. Laser printers require different type codes from matrix printers. Just about all of the printer manufacturers think their codes are the best. Because of the near infinite variety of printer available today, all STURECİ reports were designed to be non printer-dependent. This means that no mater what brand or model of printer you plan to use with STURECİ you should have no trouble getting the reports to print correctly. To achieve this level of "device-independence", STURECİ requires you to enter the commands that instruct your printer to do the following:

  • Switch between "Draft" and "Letter Quality" modes.
  • Switch among 10, 12 and 16/17 characters per inch (horizontal).
  • Switch between 6 and 8 lines per inch (vertical).

In addition to the above commands, STURECİ must also know:

  • How many printable lines on 8-1/2" x 11" page (normally 56-60).
  • If the printer can print the IBM Extended ASCII character set (graphics characters)
  • If the printer emulates Hewlett Packard LaserJet II printers (not capable of 12cpi).

If your printer prints italic alphabet characters instead of lines at the top of reports, or reports that include tables print "junk" instead of lines, you need to adjust the "dip switches" if your printer has them. Check your printer manual as to which switches need to be adjusted for the printer to print in Graphics Mode or it may be listed as the Epson graphics character set.

If your printer does not have dip switches, there should be "character set" options that you can change from the printer's front menu panel. Please consult your printer manual or your vendor. If your laser printer does not print lines for tables, check your printer manual to find out how to change the "symbol set" or "character set". The symbol set you need to use is called PC-8.

We have included the codes for five of the more popular generic command sets. If your printer will not work properly with one of these code sets, you must find out the correct codes from your printer dealer or the manufacturer, not from MicroDataSystems.

Generic Epson Emulation matrix printers
Set On Letter Quality: CHR(27)+"x1" this is a number one
Set Off Letter Quality: CHR(27)+"x0" this is a number zero
Set On 10 Characters per Inch: CHR(27)+"P"
Set On 12 Characters per Inch: CHR(27)+"M"
Set On Condensed Printing: CHR(15)
Set Off Condensed Printing: CHR(18)
Set On 6 Lines per Vertical Inch: CHR(27)+"2"
Set On 8 Lines per Vertical Inch: CHR(27)+"0" this is a number zero
Printable Lines per Page: 58
Able to Print Graphics Characters: Yes


Generic IBM ProPrinter Emulation matrix printers
Set On Letter Quality: CHR(27)+"x1" this is a number one
Set Off Letter Quality: CHR(27)+"x0" this is a number zero
Set On 10 Characters per Inch: CHR(18)
Set On 12 Characters per Inch: CHR(27)+":" this is a colon
Set On Condensed Printing: CHR(15)
Set Off Condensed Printing: CHR(18)
Set On 6 Lines per Vertical Inch: CHR(27)+"1" this is a number one
Set On 8 Lines per Vertical Inch: CHR(27)+"0" this is a number zero
Printable Lines per Page: 58
Able to Print Graphics Characters: Yes


Generic Hewlett Packard LaserJet II Emulation (no 12 point)
Set On Letter Quality: CHR(27)
Set Off Letter Quality: CHR(27)
Set On 10 Characters per Inch: CHR(27)+"(s10H" this is number one zero
Set On 12 Characters per Inch: CHR(27)+"(s16H"
Set On Condensed Printing: CHR(27)+"(s16H"
Set Off Condensed Printing: CHR(27)+"(s10H"
Set On 6 Lines per Vertical Inch: CHR(27)+"&l6D" this is a lower case "L"
Set On 8 Lines per Vertical Inch: CHR(27)+"&l8D"
Printable Lines per Page: 58
Able to Print Graphics Characters: Yes


Generic Hewlett Packard LaserJet III Emulation
Set On Letter Quality: CHR(27)
Set Off Letter Quality: CHR(27)
Set On 10 Characters per Inch: CHR(27)+"(s10H" this is number one zero
Set On 12 Characters per Inch: CHR(27)+"(s12H"
Set On Condensed Printing: CHR(27)+"(s16.5H"
Set Off Condensed Printing: CHR(27)+"(s10H"
Set On 6 Lines per Vertical Inch: CHR(27)+"&l6D" this is a lower case "L"
Set On 8 Lines per Vertical Inch: CHR(27)+"&l8D"
Printable Lines per Page: 58
Able to Print Graphics Characters: Yes


Generic Hewlett Packard LaserJet III Emulation
Landscape Orientation
Set On Landscape: CHR(27)+"E"+chr(27)+"&l1O"+chr(27)+"(10U"
Set Off Landscape: CHR(27)+"E"
Set On 10 Characters per Inch: CHR(27)+"&110"+chr(27)+"(s10H"  
Set On 12 Characters per Inch: CHR(27)+"&110"+CHR(27)+"(s12H"
Set On Condensed Printing: CHR(27)+"&110"+CHR(27)+"(s16.5H"
Set Off Condensed Printing: CHR(27)+"&110"+chr(27)+"(s10H"  
Set On 6 Lines per Vertical Inch: CHR(27)+"&110"+CHR(27)+"&l6D" this is a lower case "L"
Set On 8 Lines per Vertical Inch: CHR(27)+"&110"+CHR(27)+"&l8D"
Printable Lines per Page: 45
Able to Print Graphics Characters: Yes


Hewlett Packard DeskJet series


NOTE: Most HP DeskJet models work better with the LaserJet III codes (above).
Set On Letter Quality: CHR(27)+"(s2Q"
Set Off Letter Quality: CHR(27)+"(s1Q" this is number one zero
Set On 10 Characters per Inch: CHR(27)+"(s1T"
Set On 12 Characters per Inch: CHR(27)+"(s2T"
Set On Condensed Printing: CHR(27)+"(s85T"
Set Off Condensed Printing: CHR(27)+"(s1T"
Set On 6 Lines per Vertical Inch: CHR(27)+"&l6D" this is a lower case "L"
Set On 8 Lines per Vertical Inch: CHR(27)+"&l8D"
Printable Lines per Page: 58
Able to Print Graphics Characters: Yes

P.S. Don't keep silent -- we like feedback! Go to the message board and post your response to this article, or any other topic.


RELATED SITES
  • Microsoft.com
  • Windows Annoyances
  • Google
    Search WWW Search www.sturec.com

    Information in this document is subject to change without notice.
    All products mentioned are registered trademarks or trademarks of their respective companies.

    Questions or problems regarding this web site should be directed to info@sturec.com.
    Copyright © 2001 MicroData Systems, Ltd.. All rights reserved.
    Revised: