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

Need help on PCL sizing issue

Need help on PCL sizing issue

Need help on PCL sizing issue


We have an application we've created that generates PCL documents.  We do this using the Adobe PDF libraries.  We are turning PDF into PCL with them.

The output looks good via SwiftView (a PCL viewer) and prints out okay, but we've having a problem with sizing.  When we print, they are being shrunk down to fit inside the printer margins.  This isn't good.  The printed documents need to look like the viewed documents (which are created sized visually for margins).

We really need to direct the printer to ignore it's margins when we print.  Saying this another way, we need for the printer to attempt to fit the PCL page to the paper size.  Those areas that won't actually print are white space on the PCLs.  That way, the output on paper will look like the electronic.

We've been unable to find the PJL or PCL to insert into these PCLs to tell the printer to do this.

We're looking for someone who can tell us how to accomplish this (and has something the know works, vs. simply having searched the net and found it).  Ideally, this would be a/some PJL commands, which are easier to add to the PCL than escapes, but we'll take anything.

RE: Need help on PCL sizing issue

I know of no PCL command as such that is going to fix this for you.

The only thing I can think of is to make sure that the

                shrink to fit paper


                expand to fill paper

options are unchecked in the printer driver dialog when you print the PDF. I think that may be your problem.

Jim Asman

RE: Need help on PCL sizing issue

We don't create these via an interactive process, so we're not stating shrink or expand to fit.  We're rendering in the Adobe PDF libraries via code.

We will try removing those parameters or changing them and seeing what happens.

Can you explain what the margin options in PCL do then?  We found top, left and right margin commands that take parameters for size (nothing for bottom).  We found these:

    ESC &l#E    Top Margin
    ESC &l#F    Text Length in lines
    ESC &a#L    Left Margin
    ESC &a#M    Right Margin

What are they supposed to do?

RE: Need help on PCL sizing issue

It is when you "print" the PDF that the shrink/expand choices from the printer driver come into play.


ESC&l#E  # represents the number of lines at current linespacing

Text Length
ESC&l#F  # of text lines to print before page eject.
         Effectively defines bottom margin.

Bottom   Top Margin + Text Length

The left and right margin commands specify coloumn positions at the current character spacing. Unless you are printing straight text, fixed pitch, these commands probably don't really provide much bebefit.

The page formatting commands are interdependent. As stated above, the absolute margin positions are dependent on the linespacing(lpi) or character spacing(cpi) depending on the margin.

If you don't define all the page setup parameters together, you can often get unpredicted results.

The PCL5 Technical Reference has comprehensive descriptions of all the documented commands.


Jim Asman

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