PROGRAM:
--------

 Gimp-Print 4.0 includes an associated Ghostscript driver, which is
 named `stp'.  That name originally referred to Epson Stylus Photo
 printers; this is the first Ghostscript driver which supported those
 printers with high quality.  As of 4.0 alpha, the stp driver also
 supports the same HP and Canon printers supported by the rest of the
 gimp-print suite.


AUTHOR:
-------

 This Ghostscript frontend was originally written by Henryk Richter
 (buggs@comlab.uni-rostock.de); it has been fully integrated into
 gimp-print.  Gimp-Print itself was originally written by Michael
 Sweet <mike@easysw.com>, who released up to version 2.0; Robert
 Krawitz released version 3.0.  The gimp-print development team
 (http://gimp-print.sourceforge.net) now maintains the entire
 package.


LICENSE:
--------

  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the Free
  Software Foundation; either version 2 of the License, or (at your option)
  any later version.
 
  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  for more details.
 
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


INSTALLATION AND COMPILATION:
-----------------------------

 - Get a recent Ghostscript (5.10 or better) and prepare the sources as
   described in the documentation (don`t forget zlib, libpng and libjpeg
   when downloading the source) for compiling

 - Copy all "*.c" and "*.h" files to the Ghostscript source
   directory.  Depending upon the version of Ghostscript you use, this
   may be either the top level of your Ghostscript source
   distribution, or the "src/" subdirectory.

 - If you are using Ghostscript 5.50 or newer: edit the file
   "contrib.mak" (in either the top level or src/ subdirectoy,
   depending upon your version of Ghostscript) by adding the contents
   of "contrib.mak.addon".

 - If you are using Ghostscript 5.10: edit the file "devs.mak"(in
   either the top level or src/ subdirectoy, depending upon your
   version of Ghostscript) by adding the contents of
   "devs.mak.addon-5.10".

 - Add "$(DD)stp.dev" to the line "DEVICE_DEVS6=..." in
   "unix-gcc.mak".  If there are multiple lines that start with
   DEVICE_DEVS6=, you may add this to any such line.  If there is no
   DEVICE_DEVS6= line, you may add it to any other DEVICE_DEVSx line
   that is present.

 - The distribution includes a utility named "escputil" that performs
   many utility functions, such as head cleaning, nozzle alignment,
   and the like.  To compile this program, type "make".  Type
   "escputil" for a description of the options and functionality.

 - IF YOU DOWNLOADED A CVS SNAPSHOT OF THIS SOFTWARE, this directory
   will not include many of the source files that are generated from
   the gimp-print source.  To create these files, you must run the
   following commands from the parent directory:

   aclocal
   autoconf
   automake
   ./configure
   make ghost

   If this fails (because you do not have the Gimp or any of the
   autoconfigure tools installed on your system), you can use the
   configure script from any release, and run

   configure --disable-gimptest
   make ghost

 Compile and install gs as described in the documentation, after a
 successful compiler run you got a new driver named "stp". Check 
 this by calling "gs -h" with the newly compiled Ghostscript.



Debian users can try the following (contributed by Stuart Miles and
updated by Dan Christensen <jdc@julian.uwo.ca>): versions are current
as of 5 October 2000:

Download the debianised sources for gs-aladdin and libjpeg to the 
directory containing the print-x.xxx directory: 

# apt-get source gs libjpeg62 

(Make sure you have a deb-src entry in /etc/apt/sources.list first! 
See the sources.list(5) man page for more info on setting up apt.) 

The name of the libjpeg package may vary. 

This will download the .dsc, orig.tar.gz and diff.gz files, unpack and 
patch the files for you. 

Rename the libjpegxxx (currently libjpeg6b-6b) directory to libjpeg. 

To compile gs you will also need the following installed: 

# apt-get install sharutils zlib1g-dev svgalibg1-dev libpng2-dev vflib2-dev 

The name of the packages may vary. The above corresponds to 

sharutils 4.2.1-2 shar, unshar, uuencode, uudecode 
zlib1g-dev 1.1.3-11 compression library - development 
svgalibg1-dev 1.4.1-2 Shared, non-x, graphics library used by Ghos 
libpng2-dev 1.0.8-1 PNG library - development 
vflib2-dev 2.25.1-5 Vector Font Library for Japanese Character C 

but current versions (and possibly older versions) will probably 
work as well. 

Next do the following: 

# mkdir gs-x.xx/contrib/stp 
# cd print-x.xxx/Ghost 
# cp gdevstp* *.mak.addon* ../../gs-x.xx/contrib/stp 
# cp README ../../gs-x.xx/contrib/stp/README.stp 
# cp debian-patch ../../gs-x.xx/debian 
# cp debian-patch-stp ../../gs-x.xx/debian/patches/stp 
# cd ../../gs-x.xx/debian 
# patch < debian-patch [patches control and rules files] 
# chmod u+x addentry [maybe this should be fixed in the tar file?] 
# cd .. [now we are in gs-x.xx] 
# debian/rules binary 

The rules script will copy the sourcefiles and README.stp into the 
main gs directory, patch contrib.mak, add the stp entry to 
unix-gcc.mak, compile gs, package it all up as a .deb package 
(gs-stp_5.10-9.1_i386.deb) and put the resulting file in the directory 
above gs. 

To install it: 

# cd .. 
# dpkg -i gs-stp_5.10-9.1_i386.deb 

If you have gs or gs-aladdin installed, it will be removed. 

DISCLAIMER:

This is not an official Debian package. This method works for at 
least one person. To be really neat and tidy other files need 
modifying to ensure that this custom package gets marked as such and 
_not_ an official package. The only problem I've found is that I 
the gs-pdfencrypt insists on having gs installed rather than gs-stp. 
If you know how to fix this, please update this README. 


OPTIONS:
--------

 Options for the stp driver are given in normal Ghostscript
 manner. The resolution of the image calculated by Ghostscript is not
 bound to the resolution of the printer output. It is for example
 possible to specify "-r360" to gs and print the output in 1440x720
 dpi (see below for driver parameter). The result is a somewhat faster
 operation of the driver.

Printer Model Selection:
------- ----- ----------

-sModel=name

bjc-1000		CANON BJC 1000
bjc-2000		CANON BJC 2000
bjc-3000		CANON BJC 3000
bjc-4300		CANON BJC 4300
bjc-4400		CANON BJC 4400 photo
bjc-6000		CANON BJC 6000
bjc-6100		CANON BJC 6100
bjc-7000		CANON BJC 7000
bjc-7100		CANON BJC 7100
bjc-8200		CANON BJC 8200
escp2			EPSON Stylus Color
escp2-pro		EPSON Stylus Color Pro
escp2-pro-xl		EPSON Stylus Color Pro XL
escp2-400		EPSON Stylus Color 400
escp2-440		EPSON Stylus Color 440
escp2-460		EPSON Stylus Color 460
escp2-500		EPSON Stylus Color 500
escp2-600		EPSON Stylus Color 600
escp2-640		EPSON Stylus Color 640
escp2-660		EPSON Stylus Color 660
escp2-670		EPSON Stylus Color 670
escp2-740		EPSON Stylus Color 740
escp2-760		EPSON Stylus Color 760
escp2-800		EPSON Stylus Color 800
escp2-850		EPSON Stylus Color 850
escp2-860		EPSON Stylus Color 860
escp2-880		EPSON Stylus Color 880
escp2-900		EPSON Stylus Color 900
escp2-980		EPSON Stylus Color 980
escp2-1160		EPSON Stylus Color 1160
escp2-1500		EPSON Stylus Color 1500
escp2-1520		EPSON Stylus Color 1520
escp2-3000		EPSON Stylus Color 3000
escp2-photo		EPSON Stylus Photo
escp2-700		EPSON Stylus Photo 700
escp2-ex		EPSON Stylus Photo EX
escp2-720		EPSON Stylus Photo 720
escp2-750		EPSON Stylus Photo 750
escp2-870		EPSON Stylus Photo 870
escp2-1200		EPSON Stylus Photo 1200
escp2-1270		EPSON Stylus Photo 1270
escp2-2000		EPSON Stylus Photo 2000P
pcl-340			HP DeskJet 340
pcl-400			HP DeskJet 400
pcl-500			HP DeskJet 500
pcl-501			HP DeskJet 500C
pcl-520			HP DeskJet 520
pcl-540			HP DeskJet 540C
pcl-550			HP DeskJet 550C
pcl-560			HP DeskJet 560C
pcl-600			HP DeskJet 600/600C (Single Cartridge)
pcl-601			HP DeskJet 600 series (2 Cartridge)
pcl-690			HP DeskJet 690 series (Photo-Ink capable)
pcl-810			HP DeskJet 810C
pcl-812			HP DeskJet 812C
pcl-840			HP DeskJet 840C
pcl-842			HP DeskJet 842C
pcl-850			HP DeskJet 850C
pcl-855			HP DeskJet 855C
pcl-870			HP DeskJet 870C
pcl-890			HP DeskJet 890C
pcl-895			HP DeskJet 895C
pcl-900			HP DeskJet 900 series
pcl-P1000		HP PhotoSmart P1000
pcl-1100		HP DeskJet 1100C
pcl-P1100		HP PhotoSmart P1100
pcl-1120		HP DeskJet 1120C
pcl-1200		HP DeskJet 1200C
pcl-1220		HP DeskJet 1220C
pcl-1600		HP DeskJet 1600C
pcl-2000		HP DeskJet 2000 series
pcl-2500		HP DeskJet 2500 series
pcl-2			HP LaserJet II series
pcl-3			HP LaserJet III series
pcl-4			HP LaserJet 4 series
pcl-4v			HP LaserJet 4V, 4Si
pcl-5			HP LaserJet 5 series
pcl-5si			HP LaserJet 5Si
pcl-6			HP LaserJet 6 series
lexmark-4076		Lexmark 4076 (PCL printer)

Most or all of the Epson Stylus printers are fully functional.  The
others vary.  In particular, all of the listed Epson Stylus Photo
printers print in full 6-color photo mode; most of the others do not.
The color output has also been better tuned for Epson Stylus printers
than for others.


Print Resolution Selection:
----- ---------- ----------

The meaning of this is model-specific.

For Epson Stylus printers:

-sQuality='

'180 DPI'				 (works on older printers)
'360 DPI'                                (works on all printers)
'360 DPI Softweave'                      (works on printers that support
					  variable dot sizes, such as
					  the Epson Stylus Color 740
					  and newer)
'360 DPI High Quality'                   (works on printers that support
					  variable dot sizes, such as
					  the Epson Stylus Color 740
					  and newer)
'720 DPI Microweave'                     (works on older printers)
'720 DPI Softweave'                      (works on all printers except
					  for Stylus Color, Stylus
					  Color 1500, Stylus Color
					  1520, and Stylus Color 3000)
'720 DPI High Quality'                   (works on all printers except
					  above and Epson Stylus Color
					  440/460/480)
'720 DPI Highest Quality'                (works on all printers except
					  above and Epson Stylus Color
					  440/460/480)
'1440 x 720 DPI Microweave'              (works on older 1440x720 dpi printers)
'1440 x 720 DPI Softweave'               (works on all 1440x720 dpi
					  printers except for Stylus
					  Color 1520 and Stylus Color 3000)
'1440 x 720 DPI Highest Quality'         (works on all 1440x720 dpi
					  printers except for Stylus
					  Color 1520 and Stylus Color 3000)
'1440 x 1440 DPI Emulated'               (works on all 1440x720 dpi
					  printers except for Stylus
					  Color 1520 and Stylus Color 3000)
'1440 x 2880 DPI Emulated'               (works on all 1440x720 dpi
					  printers except for Stylus
					  Color 1520 and Stylus Color 3000)

The last two modes use oversampling to emulate higher resolutions than
the printers actually support.  In some cases they may yield improved
output quality, but they are slower than the lower resolution modes.
The other 1440x720 modes use the printer in different ways to to
achieve different tradeoffs of quality vs. performance; likewise with
the 720 DPI modes.

The Microweave modes are extremely slow on many printers.  Not all
printers can do Microweave properly, particularly at 1440x720 DPI.  If
Microweave is used with these printers, the printing will be done one
row at a time.  In addition to being extremely slow (but often
extremely high quality), this may be harmful to the print head and may
cause clogging, due to ink pooling in the print head.  If your printer
is capable of non-Microweave modes, there is seldom any advantage to
be had from using Microweave.

In general, using resolutions lower than 720 DPI on coated paper will
yield unsatisfactory results.


For PCL printers (including Hewlett-Packard and Lexmark):

'150x150 DPI'			(should work on all printers)
'300x300 DPI'			(should work on all printers, C-RET on
				DJ 850/855/870/890)
'600x300 DPI'			(DJ 6xx/810/812/840/842/895)
'600x600 DPI monochrome'	(DJ 6xx (except 69x) /8xx/1100/1120)
'600x600 DPI'			(DJ 69x/9xx/1220/2000/2500, PhotoSmart P1000
				P1100, LJ5/5Si/6)

Note: the higher resolutions of newer PCL printers using "Photo-Ret" are
not yet supported.

For Canon printers:

1200 DPI printers (BJC 7000, BJC 7100, BJC 8200, BJC 8500):

'300x300 DPI'
'300x300 DPI DMT'
'600x600 DPI'
'600x600 DPI DMT'
'1200x600 DPI'
'1200x1200 DPI'

1440 DPI printers (BJC 1000, BJC 2000, BJC 3000, BJC 4300,
    BJC 4400, BJC 5100, BJC 5500, BJC 6000, BJC 6100, BJC 6500):

'180x180 DPI'
'360x360 DPI'
'360x360 DPI DMT'
'720x360 DPI'
'720x720 DPI'
'1440x720 DPI'
'1440x1440 DPI'


Color Balancing Values: (min,max,default)
----- --------- ------- -----------------

All of the values below are interpreted as being relative to norms for
a particular printer established through testing, not "absolute"
values of any kind.

-dCyan=xxx       xxx: 0.0 ... 4.0  (1.0)
-dMagenta=xxx    xxx: 0.0 ... 4.0  (1.0)
-dYellow=xxx     xxx: 0.0 ... 4.0  (1.0)

 These three options allow specification of the cyan, magenta, and
 yellow levels independently, for rebalancing the levels.  Normally,
 these should be adjusted to yield neutral gray, but they can be used
 for other effects.

-dBrightness=xxx xxx: 0.0 ... 2.0  (1.0)

 Adjust the brightness of the image.  0.0 gives a fully black image;
 2.0 gives a fully white image.  Values greater than 1 will result in
 black not being solid and highlights turning white; values less than
 1 will result in white not being perfectly clear and shadows turning
 black.

-dContrast=xxx   xxx: 0.0 ... 4.0  (1.0)

 Adjust the contrast of the image.  0.0 gives a solid gray for the
 entire image, the exact gray depending upon the brightness chosen.

-dGamma=xxx      xxx: 0.1 ... 4.0  (1.0)

 Adjust the gamma of the image, over and above the printer-specific
 correction.  Gamma less than 1.0 will result in a darker image; gamma
 greater than 1.0 will result in a lighter image.  Unlike brightness,
 gamma adjustment does not change the endpoints; it merely changes the
 shape of the input->output curve.

-dDensity=xxx    xxx: 0.1 ... 2.0  (1.0)

 Adjust the amount of ink deposited on the paper.  If you've chosen
 the correct paper type and you're getting ink bleeding through the
 paper or puddling, try reducing the density to the lowest value you
 can while still achieving solid black.  If you're not getting solid
 black, even with the contrast and brightness at 1.0, try increasing
 the density.

 All of the printers supported here actually need less than 100% ink
 density in most cases, so the actual density is something other than
 the nominal density setting.  The effective density setting cannot go
 above 100%, so if a value specified will result in an excessively
 high density level, it will be silently limited to 1.0.

-dSaturation=xxx xxx: 0.0 ... 9.0  (1.0)

 Adjust the brilliance of colors.  0.0 results in pure grayscale;
 using this with -dColor=1 is one way of getting grayscale (see below
 under -dColor for a full discussion).  Saturation of less than 1.0
 results in more muted colors; saturation of greater than 1.0 results
 in more vibrant colors.  Very high saturation often results in very
 strange effects, including posterization and banding that might not
 be expected.  For normal purposes, the saturation should generally be
 less than 1.5.


Dithering Algorithms:
--------- -----------

-sDither='algorithm'

'Adaptive Hybrid'
'Ordered'
'Fast'
'Very Fast'
'Adaptive Random'
'Hybrid Floyd-Steinberg'
'Random Floyd-Steinberg'

Hybrid algorithms use error diffusion, but a matrix is used when a
random number is required.  Adaptive algorithms use error diffusion
except in very light regions, where ordered dithering is used.

Ordered dithering typically works best in solid-color graphics on four
color printers, and in very pale regions.  The results on six color
and variable dot size printers tend to be poor, with considerable
clumping.  It uses an array lookup to decide whether to print, and if
it is decided to print, what sub-color (in 6 color printers) and dot
size (in variable dot size) to use.  Ordered dither performs poorly on
certain kinds of very fine detail, such as fine lines.

Error diffusion algorithms (Hybrid Floyd-Steinberg and Random
Floyd-Steinberg, both of which are modifications on pure
Floyd-Steinberg) perform very well at high densities, and are capable
of rendering very fine detail well, but they tend to exhibit artifacts
in the form of "waves" or "worms" of dots which results in noticeable
texturing in pale areas.  Furthermore, pale areas immediately adjacent
to white take a while to "build up" sufficient error to print at all.
The only difference between the algorithms is that Hybrid
Floyd-Steinberg uses an array lookup where Random Floyd-Steinberg uses
a random number generator.  Hybrid Floyd-Steinberg is faster, and
probably slightly better.

Adaptive dithering usually gives the best results overall.  It uses
pure ordered dither at low densities, and Floyd-Steinberg at high
densities.  Adaptive random seldom if ever has any advantages over
adaptive hybrid, and is considerably slower due to the use of a random
number generator for each point.  Adaptive hybrid dithering uses an
array lookup for each point, which is considerably faster.

The Fast algorithm gives the fastest results at the expense of color
accuracy.  It is a simplified ordered dither.  On simple four color
printers (or other printers used in four color mode), the quality is
similar to Ordered, although dark gray rendition is not as good due to
a simpler transfer between black and colored ink.  It generally gives
very poor results in six color mode.  In black and white, it is an
efficient way to render grayscale, but it may not give best results
when used with variable dot size printers.  On rare three color
printers (CMY only) the results should be identical to ordered dither.

Very Fast is even faster than Fast, with even more loss of quality.
It uses a power of 2 matrix that can be looked up more quickly and
performs certain other optimizations.


Ink Types
--- -----

This is printer type specific.  The option names are case sensitive.
Not all ink types are supported on all printers.

-sInkType='ink type'


For Epson printers:

Six color printers can print using four color inks or all six colors.
Six color mode is recommended for photographs.  Four color mode may be
useful when printing text with embedded graphics to reduce ink
consumption.

'Six Color Photo'
'Four Color Standard'


For Canon printers:

'Black'
'Color'
'Black/Color'
'Photo/Color'
'Photo'


For PCL (Hewlett-Packard and Lexmark) printers:

'Color + Black Cartridges'
'Color + Photo Cartridges' (For Deskjet 69x only)


Media Types
----- -----

This is printer type specific.  The option names are case sensitive.

-sMediaType='media type'


For Epson printers:

'Plain Paper'
'Plain Paper Fast Load'
'Postcard'
'Glossy Film'
'Transparencies'
'Envelopes'
'Back Light Film'
'Matte Paper'
'Inkjet Paper'
'Photo Quality Inkjet Paper'
'Photo Paper'
'Other'


For Canon printers:

'Plain Paper'
'Transparencies'
'Back Print Film'
'Fabric Sheets'
'Envelope'
'High Resolution Paper'
'T-Shirt Transfers'
'High Gloss Film'
'Glossy Photo Paper'
'Glossy Photo Cards'
'Photo Paper Pro'


For PCL (Hewlett-Packard and Lexmark) printers:

'Plain'
'Bond'
'Premium'
'Glossy/Photo'
'Transparency'
'Quick-dry Photo'
'Quick-dry Transparency'


Media Sources
----- -------

This is printer type specific.  The option names are case sensitive.

-sInputSlot='media source'

No media sources are currently defined for Epson printers.  At
present, only the single sheet feeder can be used.


For Canon printers:

'Auto Sheet Feeder'
'Manual with Pause'
'Manual without Pause'


For PCL (Hewlett-Packard and Lexmark) printers:

'Standard'	(Feed from printer defined source)
'Manual'
'Tray 1'
'Tray 2'
'Tray 3'
'Tray 4'
'Portable Sheet Feeder'
'Desktop Sheet Feeder'
'Tray'
'Tray 2'
'Optional Source'
'Autoselect'


Image type (to optimize the dither):
----- ---- --- -------- --- --------

-dColor=x          x:   0 ...   1  (1)

 Choose color vs. grayscale output.  Color output is the default.
 Choosing -dColor=0 results in only black ink (no color ink) being
 used, which is faster and usually results in the most accurate
 grayscale, but at the expense of smoothness.  If you want composite
 color (using a mixture of color and black inks to produce gray), use
 -dColor=1 and -dSaturation=0.0 (see -dSaturation above).

 In addition, using -dColor=0 uses luminance (perceived brightness) of
 red, green, and blue to choose output levels.  Blue of a given
 intensity is perceived to be much darker than red, which in turn
 appears darker than green.  -dColor=1 and -dSaturation=0.0 does not
 use luminance.

-dImageType=x x:   0 ...   3  (0)
Select the image type most representative of what's being printed.  

0  Line art (color or gray scale)
1  Primarily solid colors or smooth gradients (color or gray scale)
2  Continuous-tone photographs (color or gray scale)
3  Pure black and white or pre-screened (currently black only)

For mixed documents, options 0 or 1 will probably work best.  Option 0
will dither faster and yield sharper text, but at some possible cost
to color accuracy and/or smoothness.  Option 1 may yield smoother
images and/or more accurate color.  Option 2 will yield the best
natural images, but is quite slow.  Option 3 is very fast and
accurate, but should not be used if there are any tones other than
pure black and white (or you want absolute black and white contrast).
Option 3 combined with Very Fast dithering results in extremely fast
rendering.

Note that any of the modes (except monochrome) may be used with either
color or black & white output.  If black and white output is
requested, but a color mode used, composite color will be printed.
This generally offers smoother tone, but less purity of gray or black,
than pure black ink.  Furthermore, it is possible to tune the color of
the gray (to achieve warmer or cooler effects) using the color
controls in this fashion.


EXAMPLES:
---------

Example 1 (print charts to file, color, 360 dpi):
gs -sDEVICE=stp -sModel=escp2-ex -dDensity=1.6 -dGamma=1.5 -dSaturation=0.9 \
   -dBrightness=40 -dImageType=1 -sOutputFile=itsyourchoice.prn foo.ps

Example 2 (print color photograph to /dev/lp0 at maximum quality):
gs -q -dSAFER -dNOPAUSE -sDEVICE=stp -sModel=escp2-870 -dDensity=0.8 \
   -r1440x720 -sQuality='1440 x 720 DPI Highest Quality' -dImageType=2 \
   -sOutputFile=/dev/lp0 foo.ps

Example 3 (print pure black text to stdout)
gs -q -dSAFER -dNOPAUSE -sDEVICE=stp -sModel=escp2-660 -dDensity=0.8 -r720 \
   -sQuality='720 DPI Softweave' -dImageType=3 -sOutputFile=- foo.ps


SPOOLER CONFIGURATION
------- -------------

Since the options to this driver are extremely complex, we recommend
use of the foomatic package developed by Grant Taylor
<gtaylor@picante.com>.  Please read stp-interfaces/README for more
information.  The stp-interfaces directory contains all of the
necessary files to configure an lpd, PDQ, or CUPS-based printing
system.

CUPS users may also use the CUPS driver in ../cups.  This is a more
traditional CUPS driver written by Mike Sweet that may be more
familiar to CUPS users.
