Promblem sending printer codes to printer

Promblem sending printer codes to printer

Post by Captain Kazam » Thu, 23 Dec 1999 04:00:00



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

 
 
 

Promblem sending printer codes to printer

Post by Tony Lawrenc » Fri, 24 Dec 1999 04:00:00



> 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

The "config file" is the interface script itself:
/var/spool/lp/admins/lp/interfaces/yourprinter

See http://www.aplawrence.com/Unixart/printing.html

--

SCO articles, help, book reviews, tests,
job listings and more : http://www.ApLawrence.com

 
 
 

Promblem sending printer codes to printer

Post by larr » Fri, 24 Dec 1999 04:00:00



Quote:> 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

As  Tony alluded to, the predefined escape sequences are in the interface
file.  This is what interprets
things like "-o cpi=pica". If you are using the wrong interface file, these
may be interpreted wrongly.
You could modify an interface (copy the original to a new file named after
your printer).  Most interfaces
should support the raw option, so "lp -o raw <anyfile>" should pass
everything to the printer.

--
larry
--------------------------------------------------------------
There is an infinite amount of knowledge in the universe.
I can only learn an finite amount of it.
Any finite number compared to inifinity is as zero compared to infinity.
Therefore, I know nothing.
-------------------------------------------------------------

 
 
 

Promblem sending printer codes to printer

Post by Jean-Pierre Radle » Sat, 25 Dec 1999 04:00:00


Captain Kazamy propounded (on Wed, Dec 22, 1999 at 09:25:53AM -0500):
| 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?

That option, for pica, may or may not exist in the printer interface
script you are using.  So edit the script, season it to taste...

--
JP

 
 
 

1. Sending Octal Escape codes to printer

Hi all:
A few weeks ago I posted the following to comp.unix.shell and got exactly
zero answers. I don't particularly like to see wads of cross-postings on
questions, and don't flame me about posting to the wrong group. They didn't
answer - at least I didn't see any responses.
--
How does one go about echoing two cat'ed codes to the printer? Specifically
I'm trying to setup an alternative "interface" script for a printer. This
printer has, as a default, the programmable switch-setting set for no-print
over perforation. This can be re-set, either manually, or by echoing the
appropriate code to the printer. Unfortunately, this requires two codes in
the familiar escape sequence. Escape + "N" to set it, and Escape + "O" to
re-set it.

/bin/sh

One code is trivial      -  echo "\014\c" ( for form-feed )

We'd like to send Escape + "N" i.e. [ echo "\033\c\096\c" ] doesn't work
We'd like to send Escape + "O" i.e. [ echo "\033\c\097\c" ] doesn't work

What's the trick ?
--


Lomas Data Management Inc.       | Has anyone noticed that DOS is SOD spelled |
Niagara Falls, Ontario Canada    | backwards as in the British "Sod-off" ?    |
#      Any opinions expressed are those of my previous employer
--
David Lomas

2. inode still has mappings

3. problem sending codes to printer.

4. ANNOUNCE: LinuxMonth Issue #1 is released

5. HOW TO SEND PRINTER CODES TO IBM LASERPRINTER?

6. ne3200: x86 hangs on reboot

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

8. A rising tide of panic

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

10. sending compress code to a printer

11. Help sending control codes to line printer

12. Need help about sending printer control code

13. Sending escape codes to printer ???