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

Bottom Margin

Bottom Margin

Bottom Margin

I am trying to modify a Unix printer script to fit a preprinted form.  The application sends a 1/2 inch margin at the top and bottom.  I have been able to remove the top margin, but am having trouble with the bottom one.  My text is 68 lines.  If I set pagelen to 68 lines, the last 4 lines of the text print on the next page.
Does anyone know how to do this?

RE: Bottom Margin

What size paper are you printing on?

In all likelihood, you will have to change the linespacing to accomodate 68 lines.

Jim Asman

RE: Bottom Margin

I am using letter size (8.5 x 11), landscape.  I have tried setting the page length and the text length to 68 lines, leaving the vsi value to "def" (default), and the last 4 lines of the form print on the next page.

RE: Bottom Margin

Does your paging software supply blank lines to create the margins?

If so, then

echo "\033&l2a1o6c0e68F"

should be the code required to format the page.

If your 68 lines does not include any blank lines for margins, the the line spacing will have to be reduced

I assume that you are converting a dot matrix output to a laser printer.

If you want, you can call me at the office (604)738-6112 and we will fix you up, An SCO system?

Jim Asman

RE: Bottom Margin

Thank you, Jim --I was able to modify a couple of things, and my form prints perfectly now!  The exact command I used was:  echo "\033&l2a1o5.82c0e70F\c",followed by (on the next line) echo "\033&a+.3R\c" (to line up print in small boxes on the form).
I do use SCO Unix, and I have been trying to modify an  HPLaserJet script. I put your line near the end, before the actual print command, and all the settings I need are fixed.


RE: Bottom Margin

It would seem to me that while the first page will line up OK, that if the ...&a+.3R is in the interface script, it won't have an effect on subsequent pages. Now if it is just a single page form, it won't probably matter.

Jim Asman

RE: Bottom Margin

It is actually a utility bill with 2 bills per page. I tested 2 pages (4 bills), and they were both fine. All the little boxes lined up with all the data on all 4 bills.

RE: Bottom Margin

You must mean Portrait. Landscape would be 8.5 inch with
8.0-8.25 printable.

maximum lines on portrait (at 6LPI) is generally 64, which would account for the 4 lines on the next page.

If you increase to 8LPI then you can have about 84 lines of text per page in portrait.

Ec&l8D '8lpi
Ec&l84F '84 text lines per page

RE: Bottom Margin

Actually, right now, I am getting 67 printed lines on landscape 8.5 x 11 paper; the 68th line (which is blank)is printing on the next page, and then sending a page break (form feed). So I am getting a blank page after every printed page.  The commands I am using are:
tpagelen = 68 (set early in the script)
echo "\033&l2a1o5.82c0e70\c"
My form is 34 lines, and I am trying to get 2 per page to match my pre-printed form. If I could modify that bottom margin, I think it would work.

RE: Bottom Margin

Are you also sending a ^L after 68 lines? If so get rid of it.

Send me your email address and I will send you a test file.

The original <esc>&l2a1o6c0e68F will print 68 lines per page. It does on my printers.

The individual forms are 11 wide by 4.25 high?

Jim Asman

RE: Bottom Margin

The forms are 4 1/2 x 6 inches (one end of the card is torn off and the 2 bills are torn apart before mailing).  
I am modifying a canned Sco Unix LaserJet script.  I haven't seen ^L, but this is a long script and I probably don't really know what I am doing.  
I have a test file with lines numbered, which helps a lot figuring out what is going on.
Today's problem is that I can't seem to get the text to move down about 1/2 line to fit in some boxes.  I can get the first page looking good, but after the first page the text reverts to being 1/2 line too high.  
Is there a text book, or a good class, that teaches PCL/PJL etc.?

RE: Bottom Margin

Instead of <esc>&a+.3R ...

try        <esc>&l225U

The command you are using has to be on every page
whereas the one I have suggested only needs to be
issued at the beginning. That's an ell by the way.

Jim Asman

RE: Bottom Margin


That should have been <esc>&l36U

Jim Asman

RE: Bottom Margin

Thank you - that solved my problem.  What does that command mean?  

RE: Bottom Margin

It is the sheet offset command.

The number is in decipoints(720 per inch)

Say you have a number of pages of text that you are going to print duplex(both sides of sheet), and you want some extra space for binding; i. e., on the left for odd number pages, but on the right for even. This command will apply the offset correctly.

<esc>&l###U affects the long edge of the paper

<esc>&l###Z affects the short edge of the paper

Of course there are situations when you can't use it for alignment if you are duplexing as the offset is applied differently on each side.

Look for a thread on this forum, "Electronic Documentation"

It has pointers to a PDF of the PCL 5 Technical Reference.
It contains a wealth of information.

If you're not inclined to sit at your monitor for extended periods reading this kind of thing, buy the PCL 5 bundle of printed books from HP. About $100 or so.

Jim Asman

RE: Bottom Margin

Thanks.  I did modify the number from 225 to 25 and it seemed to solve my problem.  You have been very helpful. This is a great website.

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