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

[MARGINS][PAGE LENGTH]left margin changes when I define the pagelength

Status
Not open for further replies.

yp56

Programmer
Aug 30, 2001
83
0
0
FR
Hello,
I want to use the escape commands to define the margins of the document. I use this :
<esc>E : init
<esc>&l#P : the page length
<esc>&l#F : the text length
<esc>&a#L : the left margin
<esc>&a#M : the text width
<esc>&l#E : the top margin

So this my sequence :
<esc>E<esc>&l20P<esc>&l20F<esc>&a0L<esc>&a85M<esc>&l1E

When I send this sequence My left margin is bigger than if if I send this one :
<esc>E<esc>&l20F<esc>&a0L<esc>&a85M<esc>&l1E
I remove the page length escap command.

Why my margin is not the same ? How can I send the page length without my left margin is changed ?
thanks
 
I use a Hewlett Packard LaserJet 6L but my software will be used with a HP laserJet 5100 :)
 
Your sequence makes no sense. You are saying you want to print 20 lines on a piece of paper that can only contain 20 lines, but yet you want a 1 line top margin in addition. You haven't defined the page size or line spacing. The commands all interact, and if you don't specify, the printer will use a default value, very often what you don't want.

Generally, unless you are printing &quot;galley&quot; text, you wouldn't define the left and right margins with a PCL code, but rather your application would purposefully position the text on the left.

The <esc>&l###P code is really obsolete.

A page init at minimum should include...

<esc>&l##A Paper Size
<esc>&l#O Orientation
<esc>&l##C Line Spacing
<esc>&l##E Top Margin in Lines
<esc>&l###F Text Length in Lines(Defines Bottom Margin)

Study all of these codes in the technical reference until you understand them all. These are the most basic codes to start a PCL job.

Jim Asman
jlasman@telus.net
 
ok,
but I must use the personal paper format wich id is 101
So I would send <esc>&l101A but how can I define the page length and weight ?

page lenght : <esc>&l#P
but I dont know how to define the page weight ?

Is my solution right ?

thanks :)
 
vp56,

There is no such thing as defining the page weight in PCL.

Now, this is a bunch of guesses and hints:
Do you mean &quot;page width&quot;? (even though you write &quot;weight&quot; twice...) ;-)

You can't define anything called &quot;page width&quot; either. You can define Left and Right margins (the text width, if you'd rather call it that).

The page size is defined by the <ESC>&l#A, which selects between a range of predefined paper formats. When receiving this command, the printer will print on (or request the operator to load) the requested paper format.
If you need an undefined paper format, you will need to use the &quot;Custom&quot; format, and at the same time specify in your printer's setup (or by PJL in the beginning of the job) an input tray loaded with this format.
When doing this, the printer will assume the largest possible paper format, it can manage.

For instance...
You have a HP LJ 8000 laserprinter.
You have some paper in the format 290x350 mm (11.4x13,8&quot;).
You want to be able to print on the entire sheet.

There is no predefined page size matching this format.
You cannot physically load this paper to any of the large paper trays.

You will need to use the Custom page size: <ESC>&l101A, or even more precisely: <ESC>&l8h101A
You will need to load the paper in the printer's MP tray, and tell the printer that Tray 1 is loaded with Custom.

Now you can print, but the printer will try addressing a page size of something like 297x431.8mm (11.7x17&quot;). To avoid printing outside the physical sheet of paper, you can apply the Text Lenght command: <ESC>&l#F, along with other commands you may or may not need.

And finally, as Jim suggested: Some studying of the TechRef might be worthwhile!

Hope to have been of some help.
 
hello,
Thanks for your response. I have succeded in my job. But there one thing that I didn't found yet :

You say :
If you need an undefined paper format, you will need to use the &quot;Custom&quot; format, and at the same time specify in your printer's setup (or by PJL in the beginning of the job)

I can select the &quot;Custom format&quot; But I don't know how to define the paper size with the PJL command !! If I understound right, I can only define one custom format. I define it in the printer console and I call it with the PCL custom parper command. But How can I define this format with the PJL command ? I searched but I didn't found :(

thanks a lot...
 
You're welcome,

I don't know much about PJL, sorry...
You might try looking into the PJL Reference Manual. You can download it as PDF on HP's website.

Jonas
 
I haver the PJL manual but nowhere it's write how to define custom paper format :(
 
Ok.
Maybe it isn't possible. I haven't heard of it before...

But what actually puzzles me is, why do you need to do it?
Perhaps if you explain your needs, it would be possible to describe an alternate way around it...!
 
I program my own HP PCL driver and I have two different custom paper format.
The only problem I have is that with the consol I only can define one custom paper format wich is call thanks to the PCL command.
But I think it is possible to re-define the format with PJL but I don't knwo the command
 
The available PJL commands depend on what printer you are using. In the PCL TechRef appendix A you can see which PJL commands are available on which HP-models.
The command you wish for is not available on any HP-printer. The PJL commands mostly handles settings, you can specify on the printer's control panel. And specifying the size of Custom paper is not available there either.
By definition &quot;Custom&quot; lets you print on the largest possible paper size, ie. 297mm x 17&quot; on the HP LJ 8XXX.
But unlike other papersettings (ie. A3) the printer doesn't stop with an error in case the paper is too short. This is really the difference between &quot;Custom&quot; and any other page size. And them (obviously), the Custom format is available to Tray 1 only.

There is no way (and no need) to specify the physical size of the Custom paper. Hence there aren't any need for more than one Custom paper format either.

But, I guees there is something really special about your job at hand, that would have you disagreeing with me here :)

What printer model are you using?

What exactly is it, that makes it necessary to specify the paper size, that cannot be accomplished by the PCL-commands: <ESC>&l###e###F and <ESC>&a###l###M ???

 
THe printer is a &quot;HP laser Jet 5100&quot; And I have two format that are not defined (they are cheque format) This printer has a universal 'bac'and with the control panel I can define the width (;)) and the height in mm or inch. But I can define only one format and I need two format. So I wold be happy if there is a PJL (or PCL) command wich can define this width and this heigth from the PC.
that's all :)
 
Ok.
I am just afraid, you'll have to realize that there is not.

And, as far as I can conclude, the reason for that, is that there is no need for it, since you can do it with the <ESC>&l###e###F and <ESC>&a###l###M.

I still can't figure out why that isn't good enough... ;-)
 
No, those comands :
<ESC>&l###e###F and <ESC>&a###l###M.
just define de printable page (the virtual page), but the
<ESC>&l####A define the phisical page. In the case of the custom phisical page, you must define dimensions of the paper.
 
> <ESC>&l###e###F and <ESC>&a###l###M.
> just define de printable page (the virtual page)

Yes, that is correct.

> <ESC>&l####A define the phisical page

I think, that must be either er very old or a very new PCL command.
From where do you know this command? I cannot locate it in anywhere in any of HP's references. Might it be a leftover from PCL3?

> In the case of the custom phisical page, you must
> define dimensions of the paper.

&quot;Must&quot; is such a strong word...
Let me assure you that I print 10,000's of pages using Custom paper size (not on HP printers) every single day, without ever specifying the physical paper size anywhere.
Naturally you need to avoid printing on the parts of the virtual page outside the physical page. But since you are writing the driver yourself, I can't see that would represent a problem.

I am afraid, I can't be of anymore help here...

 
>> <ESC>&l####A define the phisical page

> I think, that must be either er very old or a
> very new PCL command.
> From where do you know this command?
> I cannot locate it in anywhere in any of HP's
> references. Might it be a leftover from PCL3?

I must be going blind... :)
I was looking for a way to define the measurements of the physical page. Obviously I do know about the <ESC>&l###A.

Yet I still state that you wont be able to define the size of the Custom size, since it by definition is &quot;up to the largest paper, the printer can handle&quot;.
 
There are the following PJL Commands ...

PAPER LETTER, LEGAL, CUSTOM ;-) etc

PAPERLENGTH Length in Decipoints

PAPERWIDTH Width in Decipoints


I have never used these myself, and the implementation probably varies from printer to printer.

What size are your checks?

Whenever I have an odd paper size, I print from the fold down tray and declare the paper size the closest larger one. Then code the printing to land at the appropriate spot on the sheet. There is obviously a minimum length required for the paper to get through the printer.


Jim Asman
jlasman@telus.net
 
>>Let me assure you that I print 10,000's of pages using
>>Custom paper size (not on HP printers) every single day,
>>without ever specifying the physical paper size anywhere.

All I know is that when I don't define the right paper size in the printer consol and I use the custom paper size, the printer send an error...



* jlasman : cool :) where did you find those variables ? And don't know much about PJL and I only try once to send PJL command unsuccessfull :( Can you show me how I can set those variables with PJL ?
thanks a lot
 
PJL Technical Reference.

Are you printing via a windows driver or from a DOS or UNIX machine?

What size are the checks?


Jim Asman
jlasman@telus.net
 
I do my own driver for a hp5100 :)
I have the &quot;PJL Technical Reference&quot; but I didn't found this :(
thanks (If you can tell me the page of the manual where it's writing :) )
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top