Output to file, stream, printer

Stew Ellis elliss at eecae.ee.msu.edu
Thu Mar 28 07:35:00 AEST 1991


I have snarfed gs 2.11 from prep.ai.mit.edu and compiled it on a Sun 3
running SunOS 4.1 and Openwindows 2.  I have selected X11 and the deskjet
for output devices.  The X display generally works pretty well with the
included *.ps files as well as the ones that come with Sun OW2.  A couple
of the sun files do not work completely because of fonts missing with gs,
but at least they put up a partial display on the screen.  I can even use
a pipeline (I can't remember all of the switches) more or less like:

  xwd | xpr |lpr

to send pages displayed on screen to the original deskjet I have connected
to serial port ttyb.  Of course these images are limited to the screen
resolution of about 72 dpi.

I am having several kinds of difficulty printing images rendered by gs.
The first difficulty is in generating the image.  The only way I have been
able to generate any image at all is by running gs interactively and using
the 1 getdevice setdevice (are those in the right order?) sequence
followed by (filename.ps) run   to get a file output to /tmp/prn_xxxxx,
then doing an lpr on the file.  Not all of the Sun demos yield output
files and I am not at all sure why.  I particularly want the porsche.ps in
all of the grey-scale glory that gs is capable of.  I also failed to
obtain an output file for the overview.ps file that is in the Sun demo
directory after gs spent 20 or so minutes processing it and loading fonts,
etc.  When files are not generated there is no error message.

I have tried gsnd to no avail with several files.  What is supposed to
happen to the output of gsnd?  Where are the switches for gs documented?
I don't wish to sound ungrateful, but I can't find any discussion of many
of the basic issues such as default output, whether gs is a filter,
switches.  Online help would be useful.  Is there any?  If I type in
anything gs does not like I get all sorts of information that is
essentially meaningless to me.  Where are those errors explained?  I would
like to have a usage prompt if gs is invoked with -h or -?.  Instead I get
gs loading (-?) or exiting and telling me that -w and -h need numeric
args.  I also would like to be able to query gs while it is running to see
what devices it has support for.  Is there some way to do that?

On a slightly different front, I am having handshake difficulty with
sending graphics images generated by gs to the djet using lpr.  The images
from the xwd|xpr|lpr pipeline seem to be much less cranky.  Most gs images
drop handshaking after about an inch or so of raster is printed.  The same
images print almost flawlessly if I tar the files to tape, unplug the
printer from the sun, tar the image files onto a 386 Xenix 2.3.3 box, hook
the printer up parallel to the 386 and lpr the files the the djet.  These
are the files generated by gs; I have not tried to bring up gs on the 386
yet for lack of filespace for the fonts.

  My printcap on the Sun follows:

lp|hplj|HP LaserJet:\
        :lp=/dev/ttyb:\
        :sd=/usr/spool/lp:\
        :br#9600:pw#80:\
        :ms=-parity,-cstopb,-clocal,-cread,crtscts,-ixon,-ixoff,-opost:\
        :sh:of=/usr/lib/hplaserjet:

I have tried 19200 baud also.  I have also tried all combinations of
crtscts ixon and ixoff settings.  I believe my cable is alright; it
consists of a 25-pin ribbon cable and a commercial nullmodem.  I have also
tried a different cable that is a full 25-pin I believe.  Still no dice.
I have also dipped the printer to accept both xon-xoff plus DTR
handshaking and then dipped it to only work with DTR.

I have been able to print the graphically composed text pages generated by
cat2dj using the vfonts.  Any help or suggestions that do not ask me if I
have the switches turned on will be accepted and appreciated.  You may
mail or post.



More information about the Comp.sys.sun mailing list