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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help on PCL sizing issue

Status
Not open for further replies.

klamerus

Programmer
Jun 23, 2003
71
US
Help.

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.
 
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

and

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
 
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?
 
It is when you "print" the PDF that the shrink/expand choices from the printer driver come into play.

Margins

Top
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top