Operating System - HP-UX
1833062 Members
3136 Online
110049 Solutions
New Discussion

How to change default printer settings by ESC-sequence

 
Ivan Efimenko
Contributor

How to change default printer settings by ESC-sequence

Here is the problem:

We want to format output of 'lp' command to network printer using Esc-sequence.
We would like to change number of lines per page to 72 instead of 64 which is default value.
What is correct Esc-sequence to implement this setting?
1 REPLY 1
Alexander M. Ermes
Honored Contributor

Re: How to change default printer settings by ESC-sequence

Hi there.
Try to copy the following dtring into an empty file, then add the file to be printed after that and then just give it an lp.
The file will then be printed in LANDSCAPE on A4 paper.

/eE/e&l1o26a5.45C/e(s0p16.66H/e&k6.75H/e&k2G

These escape sequences can be read in the manuals of the printers ( these days mostly on the cd delivered with the printer ).
Rgds
Alexander M. Ermes

p.s.
You can change the escape sequences for your behalf
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"