> Hi everyone,
> I'm trying to send printing codes (esc sequences for us old dos people)
> to my dot matrix printer, through the lp command. How can I do this? I
> tried with the '-o' option then cpi=10, but I get the following error;
> lp -d P19S -o cpi=10 .profile
> Warning: P19S not configured to handle all lp options:
> ignoring: -o cpi=10
> how do I get lp to handle all the options?
The lp interface scripts use 'tput' to send escape sequences (in exactly the
same way as for a terminal). Therefore, your printer needs to have a terminfo
entry with the appropriate CPI settings defined (eg do an infocmp epson2500).
You can always create your own terminfo database entry.
Look at man pages for infocmp, terminfo and tic.
Obviously the print spooler needs to know about the printer type as well (eg
lpadmin -p P19S -T epson2500) or it won't know which codes to send.
Of course, you could always hand-hack the interface script if you are that way
Adrian Ball - Technical Consultant || Barron McCann Ltd
|| tel: 01283 535311 fax: 742332