sending compress code to a printer

sending compress code to a printer

Post by Captain Kazam » Wed, 22 Dec 1999 04:00:00



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?

thanks in advance
Dean Harper

 
 
 

sending compress code to a printer

Post by Adrian Bal » Thu, 23 Dec 1999 04:00:00



> 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
inclined...

Regards,
--
  Adrian Ball - Technical Consultant   ||      Barron McCann Ltd            

                                       ||    http://www.bemac.co.uk/      
                                       || tel: 01283 535311  fax: 742332

 
 
 

1. Promblem sending printer codes to printer

Hi everyone,

I'm having problems send printing codes (esc sequences for us old dos
people) to a dot matrix printer from the lp commad line. I've also tried

useing the '-o cpi=pica' but no luck there either. Is there a way to
send the esc codes directly from the command line or a config file i can

edit to send the code?

thanks in advance
Dean Harper

2. Installing Linux

3. Sending Octal Escape codes to printer

4. Partitioning for ftp server?

5. problem sending codes to printer.

6. redirect in .htaccess

7. HOW TO SEND PRINTER CODES TO IBM LASERPRINTER?

8. egcs & kernel compiles

9. Sending printer control codes via lpr on SGI Irix 5.3

10. How can I send the contents of a buffer to a line printer from C code?

11. Help sending control codes to line printer

12. Need help about sending printer control code

13. Sending escape codes to printer ???