From: gaijin@ale.Japan.Sun.COM (John Little - Nihon Sun Repair Depot)
Newsgroups: comp.lang.postscript
Subject: Re: Ghostscript 2.4 (LONG)
Summary: Specifying an inkjet as an output device
Keywords: makefile, devs.doc, -sDEVICE=, HP, compression
Date: 15 Apr 92 05:18:54 GMT
Organization: Nihon Sun Microsystems - Atsugi Technical Centre - JAPAN.
NNTP-Posting-Host: ale.japan.sun.com

In article <1992Apr14.165554.2416@ctr.columbia.edu> burra@sun1.coe.ttu.edu  \
(Gangadhar Burra) writes:
%
%  I am running Ghostscript 2.4 under a sunos 4.1.1. The standard release of
%  ghostscript comes with an x11 device type for the unix environment. Would
%  somebody please tell me how I can generate an hpgl or hp inkjet format
%  output using ghostscript? 
%  

Gangadhar,

   The file  "use.doc" gives  instructions on  how to  specify (and  list)
   available output devices.  The following missive may help if you have a
   version built with only the default X11 device.

   First, find the file "devs.mak" in the gs24 source directory.  It gives
   information on what  printers and  other devices are  available in  the
   first few paragraphs.

   You'll need to edit  the makefile, add the  drivers of your choice  and
   then re-make.  Find the line starting "DEVICE_DEVS" in the makefile and
   add the device names of your choice (from "devs.mak").  The device name
   needs to have ".dev" as a suffix.  Multiple devices can be specified on
   the same line, separated by a space.   The first device name after  the
   "=" character will be the default device.  So....

          DEVICE_DEVS=x11.dev deskjet.dev epson.dev laserjet.dev

                                       will produce a version of "gs" with
   support for X11 (the default), Deskjet, Epson and Laserjet devices.

   Some HP devices use  data compression to cut  down on the  transmission
   overhead between host  and device.   My HP Quietjet  doesn't have  this
   feature, so although I naively imagined that the "deskjet" would be the
   "closest fit" device  to specify, the  actual output was  garbage.   It
   turns out that  using the "laserjet"  device specifier produces  output
   acceptable  to  the   Quietjet  (because  the   Laserjet  doesn't   use
   compression either). 

   Check the manual for your printer and find out if uses compression, and
   if so, what mode.  The information which I used to match the driver  to
   my printer is in the file "gdevdjet.c".  The information on compression
   modes (and "PCL" level)  is in comments  in the initialisation  strings
   array near the top of that file.   [Is there an easier way to do  this,
   folks?]

   Once you've rebuilt "gs" to include the extra devices, you can  produce
   a file suitable for sending to  your printer using a command  something
   like:-

       gs -sDEVICE=laserjet -r96x96 -sOUTPUTFILE=gs.out.%02d chess.ps

   This should produce a file "gs.out.01"  which you can then send to  the
   printer.  You might need to fiddle with the printcap entry a little  to
   get   "lpr"    to   handle    the   output    properly.       Including
   ":sh:mx#0:ms=pass8,ixoff"  works   quite   well  with   my   particular
   configuration, but you need to check  the printer set-up and edit  your
   printcap accordingly (use "man stty" to get info on the "ms" flags used
   in the printcap file).

   As you  can probably  glean  from this,  I've  just gone  through  this
   particular loop myself, so  any further information  or hints would  be
   welcome. 

   Anyone care to comment on whether this should be taken into one of  the
   "gnu" groups (gnu.misc.discuss/gnu.ghostscript.bug)?

-- 
  ---------------------------------------------------------------------------
 |   John Little - gaijin@Japan.Sun.COM  |  Sun Microsystems. Atsugi, Japan  |
  ---------------------------------------------------------------------------
"Hi-ho Silver! Here comes the Lone Ranger. He's ridin' on down, to rescue you."