Printfilters .....

Bill Campbell linux-sxs
Tue Nov 14 15:11:58 PST 2006


On Tue, Nov 14, 2006, Ben Duncan wrote:
>Anyone got one for LPRng that can do passthru printing.
>I need to redirect the output to the tty that initiated the
>print command ...

It wouldn't be too difficult to do by simply defining the printer
initialization string to send the printer-on command to the port,
and an ending string to turn it off.

I handle this directly in the accounting software I wrote by
generating the print codes in the output, keeping track of the
status of the terminal and printer as this allows me to deal with
terminals that have wierd pass-through printing codes and quirks
(e.g. one terminal sent the printer-off code through to the printer,
putting it in six inches per line mode requiring a printer reset
at the next printer-on including resetting pitch, etc.).

Back in the day when most terminals were on intelligent multiport
boards like the Specialix, this was handled in the board's serial
driver routines.

Another solution that worked fairly well with PC Interface and
other DOS/Windows systems running a terminal emulator, is to
print to a file in a Samba mounted directory that's accessible to
the Windows machine, with a process watching that directory for
new files to print.  The *nix machine can then ``mv'' the file
into that directory when it's complete to avoid issues with
partial files.

Bill
--
INTERNET:   bill at Celestial.COM  Bill Campbell; Celestial Software, LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

No man's life, liberty, or property are safe while the legislature is in
session. -- Mark Twain



More information about the Linux-users mailing list