Summary: Printer Redirection

From: Phill Hoff (phoff@panix.com)
Date: Mon Jun 28 1993 - 19:30:57 CDT


I recieved two good and very diffent answers to my post of:

|> We would like to capture a postscript output from a Wingz spreadsheet and put itin a file. Then move that file to our pc and print it on the pc's color printer.We are running SUNOS 4.1.3 and newprint. I tried changing the /etc/printcap's
|> lp=/dev/lpvi0 to lp=/tmp/filename but it did'nt work. Any suggestions?
|>
|> Regards,
|> Phil
|>
|>

You did not mention which version of Wingz you are running.
I use Wingz 1.1b. To print to a file you simply select print from
the file menu. Then change the Destination to File (it probably defaults
to Printer).

-- 
Craig Zook   -   zook@pat.mdc.com

Here's an example of something I have that works in a similar situation (sending printer output to a command on a remote system). I use the ``if'' (input filter) option in the printcap file, and specify the ``lp'' (output device) as /dev/null:

# # Network printer, send output to cedar # np|cedar:\ :if=/usr/spool/lpd/lfilter:\ :lp=/dev/null:

The input filter file /usr/spool/lpd/lfilter is an executable shell script that looks like this:

#!/bin/sh rsh cedar /users/cedar/bin/cprint exit 0

Note that the script receives the data to be printed in its stdin, so you should be able to use an input filter as simple as this:

#!/bin/sh cat > /tmp/out.ps exit 0

Make sure that the input-filter script is world-executable, and that the output file (/tmp/out.ps or whatever) is world-writable.

Jeremy Scofield jeremy@cedar.UUCP

Many Thanks, PhiL



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:58 CDT