Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
cancel
Showing results for 
Search instead for 
Did you mean: 

top margin option for lp

top margin option for lp

Does anyone know an option to specify a top margin when using "lp"? I have been reading a lot about the PCL5 printer language and I am not sure if I am on the right track. Thanks.
1 REPLY
A. Clay Stephenson
Acclaimed Contributor

Re: top margin option for lp

Hi Debbie:

The answer to that question depends upon the 'interface' file for your particular printer.
cd /var/spool/lp/interface
There should be an interface file with the same name as your print queue. e.g. myprinter
Typically this script calls another script /var/spool/lp/interface/model.orig/myprinter.
If you examine these interface file, you will find many options that you can send to the lp command. For example, if your printer uses the net_lj4x script (it well be renamed 'myprinter') then top margin is set by -o tm3 to skip down 3 lines.

e.g.
lp -dmyprinter -tm3 myfile

If another printer model is used you may well use another option to do the same thing. The key is to examine the interface and see what options it supports. In the worst case, you can add your own -o option to set top margin. Many interface files support the the -o options option to list the supported options.

This should get you started, Clay
If it ain't broke, I can fix that.