Office Manager for Windows
Case Manager for Windows
Appointment Scheduler
2000 Price List
Demo
Download Files


SOS Business Partners
Receive Update Notifications
Electronic Claims
User Forum
Home
Site Map


   

                           

             

 

 

 

 

 

 

 

Topic: Alignment of HPLaserjet and Compatible Printers
Document: #111
Product: Office Manager 4 (DOS)
Date: November 3, 1997
Author: Seth Krieger

 


 

Unfortunately, there are minor differences between brands, models, and even individual printers in how they position an image on a page. With page printers like laser printers and many inkjet printers, it is not possible to adjust the paper position manually. We must use printer control codes to change the placement of the image on our forms.

Hewlett Packard Laserjet II versus Newer Models

Some significant improvements were made in image control with the introduction of the Laserjet III printer. As a result, much finer control of image placement is possible with the newer printers. If you have a Laserjet Series II, or one of the many printers that emulate it, you will not be able to make small adjustments in the left-right position of the print on the page -- the control referred to as left offset. In the examples and discussion below, the left offset codes are available only in the newer models and are clearly marked to that effect. Do not include any of these new codes if your printer does not support them.

If you have a Laserjet II (or compatible) and have a left-right positioning problem with the HCFA 1500 insurance claim, there are alternate claim formats that you can use to shift the image one or two spaces to the right. Find PRINT HCFA 1500 CLAIM FORMS on the Create/Print Insurance list. Press u to edit the entry. On the Command line, change the definition name from HCFA1500 to HCFAR1 to shift one space to the right, or HCFAR2 to shift two spaces to the right.

Printer Configurations

To adjust the placement of the image on your forms, you will have to make some changes to the printer configuration you are currently using, or, alternatively, create a new printer configuration and use it in one or more of your printer assignments. You could, for example, create one configuration for use with statements and another for use when printing insurance forms. Before beginning, it might be a good idea to review the section on printer assignments and changing printer configurations in your OM or CM manual.

Each printer configuration consists of six control code sections:

  1. Draft, 80 column, 10 characters per inch.
  2. Draft, compressed, 132 columns, 17 characters per inch.
  3. Bold (emphasize) on.
  4. Bold (emphasize) off.
  5. Reset to power-on defaults.
  6. Additional set-up codes.
When a report is printed, at the top of each page the program sends the reset codes, followed by the additional set-up codes, followed by either the 10 cpi codes or the 17 cpi codes. At the end of each page, the reset codes are sent once more. If used by the report you are printing, the bold codes are sent as required.

Generally there is enough room to enter all of the required page setup codes in the Additional set-up codes group. This is preferable so that the printer is put back to the original power-on status by transmitting only the necessary codes when your report is completed. Functionally, however, it usually will work out if you have the other page control codes in either the Reset or Additional set-up area of the configuration.

Control Codes

All Laserjet control codes begin with the number 27, which represents the escape character. In fact, the use of escape as the first character of printer control sequences is so prevalent that printer controls are sometimes knows as "escape codes".

 

 

Draft

10 cpi

27 40 115 49 48 72

Compress

17 cpi

27 38 107 50 83

Bold

On

27 40 115 51 66

Bold

Off

27 40 115 48 66

Reset to

Defaults

27 69

Additional

Set-up

27

38

38

108

108

54

45

50

54

70

48

27

85

38

27

97

38

43

108

46

54

53

68

48

27

82

38 108 49 69 27

 

Notice in the example above that the sequence of numbers in each section begins with 27. Now look carefully at the last section, the additional set-up codes. This long sequence is actually five shorter sequences listed one after the other. Look for 27 to see where each sequence begins.

Sequence 1 (left offset): 27 38 108 45 54 48 85

Sequence 2 (lines/inch): 27 38 108 54 68

Sequence 3 (top margin): 27 38 108 49 69

Sequence 4 (text length): 27 38 108 54 50 70

Sequence 5 (vertical cursor position): 27 38 97 43 46 53 48 82

Most of the numbers in each sequence are fixed, telling the printer what aspect of the image you want to print. One or more numbers in each set, however, may be adjusted to alter the way that aspect is printed.

The numbers used on the printer configuration screen are what are knows as decimal codes. Each decimal code represents a computer character. Some of these are normal letters and numbers, others are non-printable characters such as "escape". If you were to study your printer manual, you might find these codes represented in a printable shorthand, a series of decimal codes, as above, or a combination. For consistency in the entry of these codes on screen, SOS programs use just the decimal equivalents. For our purposes here, there are very few that you need to know, and they are represented in the table below:


 

 

Name

Decimal Value

Escape

27

Plus

43

Minus

45

Period

46

Zero

48

One

49

Two

50

Three

51

Four

52

Five

53

Six

54

Seven

55

Eight

56

Nine

57

 

Sequence 1 - left offset (Laserjet III and later)
27 38 108 a b c 85

Let's return to our series of control sequences in Additional set-up. Sequence 1, which is for Laserjet III and newer printers only, allows us to make fine adjustments in where the image will be placed relative to the left edge of the paper (left offset). The command can be represented as 27 38 108 a b c 85, where "a", "b", and "c" are numbers that we can use to alter this setting. The first of these, in position a, determines whether the image should be shifted to the left (minus, decimal value 45) or the right (plus, decimal value 43). The next two numbers, b and c, represent the amount of the shift, measured in decipoints. Each decipoint is 1/720th of an inch. A full character width is 72 decipoints, 1/10th of an inch. To move the image a half-character width to the left, you would specify 45 followed by numbers representing 36 decipoints.

Characters on the configuration screen are represented by their decimal equivalents. You cannot just type in the number 36. Refer to the table above to convert to decimal.

The number 36 translates to the decimal code 51 54, the first number representing 3 and the second representing 6. In summary, then, to move our left offset a half-character to the left, we add "minus three six" (45 51 54) to our sequence. If we wanted to push the offset to the right by a half-character, it would be "plus three six" (43 51 54). Here are some examples, showing the entire control sequence:

 

 

Effect

Control Code Sequence

3/4 character left

27 38 108 45 53 52 85

1/2 character left

27 38 108 45 51 54 85

1/4 character left

27 38 108 45 49 56 85

1/4 character right

27 38 108 43 49 56 85

1/2 character right

27 38 108 43 51 54 85

3/4 character right

27 38 108 43 53 52 85

 

You are by no means limited to the examples shown here. You can modify the fifth and sixth numbers as necessary to get the placement you need.

Remember, changing the left offset is possible only in the newer printers. The Laserjet II and printers that emulate it will not respond to this command!

Sequence 2 - lines per inch
27 38 108 54 68

By default, laser printers do not print the standard six lines per inch because the equipment is unable to print on the top or bottom quarter inch of each page. To squeeze 66 lines onto a page they compress the line spacing slightly. For most purposes this variation from the standard makes no difference, but when completing pre-printed forms it is deadly. This code sequence simply forces the printer into a true six lines per inch. Be sure you include it.

Sequence 3 - top margin
27 38 108 a 69

The most common adjustment to the standard codes is a change in the top margin. Increasing the top margin has the effect of lowering the placement of the image on the page. The number of lines in the top margin is controlled by the second to last character in this sequence, represented above by the variable "a". It should be in the range of zero to three (decimal 48 to 51). Here are some examples:

 

 

Top Margin Size

Control Code Sequence

one line

27 38 108 49 69

two lines

27 38 108 50 69

three lines

27 38 108 51 69

 

Sequence 4 - text length
27 38 108 a b 70

This text length setting determines how many lines can be printed on a single page, not including the top margin. Normally the default setting should be fine. If you find that text is overflowing onto the next page, you may have to increase this value by one. Below are some realistic settings, the default being a text length of 62 lines (decimal 54 50):

 

 

Text Length

Control Code Sequence

60 lines

27 38 108 54 48 70

61 lines

27 38 108 54 49 70

62 lines

27 38 108 54 50 70

 

Sequence 3 - vertical cursor position
27 38 97 a b c 82

Sometimes adjusting the top margin in full line increments is not sufficient to position the image correctly. To adjust less than a full line we can use the move cursor vertically by row command.

Before you add or change this setting, get as close as you can by modifying the top margin setting. Use this move cursor setting for fine tuning, rather than large changes.

This sequence is similar in form to the left offset. First we must specify a direction relative to what we already have. For instance, if we want to move the image up slightly, we would start with minus. To move down, we would start with plus. The numbers following the direction indicate the number of rows (lines). We will be increasing or decreasing by less than one row, so the next character will be a decimal point (the period) which has a decimal equivalent of 46, followed by the actual amount. Here are some possibilities, though you can use others:

 

 

Cursor Position

Control Code Sequence

Up 0.75 lines

27 38 97 45 46 55 53 82

Up 0.50 lines

27 38 97 45 46 53 48 82

Up 0.25 lines

27 38 97 45 46 50 53 82

Down 0.25 lines

27 38 97 43 46 50 53 82

Down 0.50 lines

27 38 97 43 46 53 48 82

Down 0.75 lines

27 38 97 43 46 55 53 82

 

Below are several sample configurations for different HP laser printers that have been tested with SOS Office Manager 4. Even if you have the same model printer, do not be surprised if your configuration will vary some from those printed here. There are still individual differences between printers of the same model.

 
Synergistic Office Solutions, Inc.
Voice: 352-242-9100        Fax: 352-242-9104

Copyright © 1996-2004 Synergistic Office Solutions, Inc. 
- All rights reserved -