Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem setting text length on laserjet 4100N 1

Status
Not open for further replies.

genesis1923

Programmer
Jul 18, 2003
3
0
0
GB
I am printing to a networked (NT) LaserJet 4100N from Unix and cannot get the page length changed from 60 lines. The file being printed is a text file with 66 physical lines per page (no form feeds).

I am embedding the PCL commands into the beginning of the file as a continuous stream, i.e. no line feeds. The PCL commands that I am using are:
Esc(1E (Reset)
Esc&l26A (Paper size A4)
Esc&l0O (Portrait)
Esc&l7.6C (VMI)
Esc&k11H (HMI)
Esc&l2E (Top margin of 2 lines)
Esc&l66F (Text lines per page)
Esc&a0R (Vertical position to line 0)

Result is 60 lines of text printed rather than 66. Line 61 prints as first line of next page.

Line 1 prints 11mm from top of page.
Line 60 prints 249mm from top of page leaving a 48mm bottom margin.

I originally used the Esc&l70P (70 lines per page) in place of the paper size command without success. Older HP printers on the same network work perfectly using the same PCL codes.

If I change the VMI to a smaller value, the lines become compressed and the bottom margin gets bigger but the number of lines printed stays the same.

It seems as if the only command being ignored is the text length.

The printer is unfortunately on a customer site more than 200 miles away so it makes testing a little difficult. Any help would be much appreciated.



 
<esc>E<esc>&l26a0o8c2e66F<esc>&a0R<esc>&k11H

The above should work.

Your reset command is wrong as shown.

Your HMI command will be defaulted if you issue a font command of any kind.

Jim Asman
jlasman@telus.net
 
Thanks for the reply Jim.

My line showing Reset should have been:

Esc E (Reset)
Esc(1E (Select ISO 4: UK symbol set)

My mistake, thanks for seeing it. However I still have the same problem in that I only get 60 lines of text. My new
PCL reads:

Esc E (Reset)
Esc(1E (Select ISO 4: UK symbol set)
Esc&l26A (Paper size A4)
Esc&l0O (Portrait)
Esc&l7.6C (VMI)
Esc&k11H (HMI)
Esc&l2E (Top margin of 2 lines)
Esc&l66F (Text lines per page)
Esc&a0R (Vertical position to line 0)
Esc&k2G (Convert LF to CR,LF)

Your suggestion of <esc>E<esc>&l26a0o8c2e66F<esc>&a0R<esc>&k11H plus <esc>&k2G
is also finishing the page at line 60 with lines 61 to 66 appearing on the next page.

Not sure where to go from here.

Regards

Richard Flack

 
The PCL code is correct, so I can only assume that an outside agent is modifying the code on the way to the printer.

This is classic on SCO using the HPLaserJet Interface script. If you are on UNIX add '-o raw' to the lp command. The interface in &quot;cooked&quot; mode is sending a FF after every 60 lines to format raw text.

Otherwise, you will have to figure out how to set raw mode on your system. I'm quite certain that is the problem.


Jim Asman
jlasman@telus.net
 
Jim

Excellent advice, now printing 66 lines per page.

I was under the impression that the same SCO interface file was being used by all the laserjets so didn't think to look for problem at that end. I will have to check further.

Your help is much appreciated.

Richard Flack
 
It's not the interface file directly, but rather /usr/lib/lprpp that is called by the interface that does the deed. In cooked mode only, of course.

Jim Asman
jlasman@telus.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top