cancel
Showing results for 
Search instead for 
Did you mean: 

Set printer font size in 17 cpi

Edgar Brito
Advisor

Set printer font size in 17 cpi

I have a p4014 printer. I need to set font in 17 cpi by default.

I have tried "lp -ofp17 -dprinter_name hosts" and it worked fine, how ever I need to set this conf by default. I think it could be possible editing /etc/lp/interfacers/model.orig/model_printer_script

Thanks in advance.
4 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Set printer font size in 17 cpi

Is this for HP-UX?
Edgar Brito
Advisor

Re: Set printer font size in 17 cpi

Yes it is.

I used PCL# script I modified line

pitch="def" by

pitch=17

I could fix as default 17 cpi.

I do not know how to modify the script of P4014 printer its code is more complex.
Bill Hassell
Honored Contributor

Re: Set printer font size in 17 cpi

Changing the line:

pitch="def"

to

pitch=17

should work. This is where the code in the script changes the pitch:

case "$pitch" in
def);;
c) echo "\033(s16.66H\c";;
e) echo "\033(s9H\c";;
*) echo "\033(s${pitch}H\c";;
esac

What this code does is to insert an escape sequence to change the pitch. When you use -ofp17, the code: ESC(s17H is inserted in front of the print job. When $pitch is not "def", the new value is inserted into the job.

The model.orig directory with the name of the print_queue is the correct file to change. Don't change the template directory /usr/lib/lp/model as you may need the original sometime in the future.


Bill Hassell, sysadmin
Suraj K Sankari
Honored Contributor

Re: Set printer font size in 17 cpi

Hi,

Check your printer manual, I think you can set this 17 CPI from your printer end also.


Suraj