×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Problem setting text length on laserjet 4100N

Problem setting text length on laserjet 4100N

Problem setting text length on laserjet 4100N

(OP)
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.

  
  

RE: Problem setting text length on laserjet 4100N

<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

RE: Problem setting text length on laserjet 4100N

(OP)
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

RE: Problem setting text length on laserjet 4100N

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 "cooked" 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

RE: Problem setting text length on laserjet 4100N

(OP)
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

RE: Problem setting text length on laserjet 4100N

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close