HP Emulation: Setting Lines Per Page and Lines Per Inch

Can the number of lines per inch and lines per page be set when using the LaserJet emulation mode on LaserWriter printers?
The number of lines per inch and lines per page can be configured using the standard PCL escape code sequences. The value can be changed from within the HP emulation mode using the following PCL escape code sequence:

  <esc>&l#e##F

Where:
  l is a lower case L
  # is the top margin
  ## is the page length (default is 60)


To enter <esc>, press the Ctrl-P keys followed by the Esc key.

Note: You must use an ASCII text editor like DOS EDIT. You cannot enter the <esc> character in some Windows-based editors like Notepad.

In addition, the following escape sequence can be used to set the number of lines per inch, allowing more lines per page by decreasing the empty space between each line.

  <esc>&l#D

Where:
   l is a lower case L
   # is the number of lines per inch (default is 6)

There are several methods for downloading the information to the printer. From a standard PC that has BASIC available the following program will work. Be sure to replace the # and ## with the desired option values.

Program for setting the lines per page
10 REM This program allows the number of lines per page
20 REM to be set while in the LaserJet emulation mode.
30 REM Replace the # with the desired top margin. (1 is the
40 REM minimum recommended value to avoid losing lines off
50 REM the top of the page)

55 REM Replace the ## with the desired number of lines per page.
60 LPRINT CHR$(27)"&l#e##F"

Program for setting the lines per inch
70 REM This program allows the number of lines per inch
80 REM to be set while in the LaserJet emulation mode.
90 REM Replace the # with the desired number of lines per inch.
100 REM The default value is 6. Options are 1,2,3,4,6,8,12,18,24,48.
110 LPRINT CHR$(27)"&l#eD"
Published Date: Feb 19, 2012