home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / gs403osk.tgz / gs403osk.tar / devices.txt < prev    next >
Text File  |  1996-10-17  |  80KB  |  1,804 lines

  1.    Copyright (C) 1992, 1995 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17.  
  18. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  19.  
  20. This file, devices.txt, gives more detailed documentation about
  21. certain specific devices for which Ghostscript can produce output.
  22.  
  23. For an overview of Ghostscript and a list of the documentation files, see
  24. README.
  25.  
  26. Devices for which this file currently contains documentation:
  27.     SPARCprinter
  28.     HP DeskJet 520, 540, and 560C
  29.     HP DeskJet 500C & 550C
  30.     HP PaintJet, XL, and XL300
  31.     DEC LJ250
  32.     Apple Dot Matrix Printer (and Imagewriter)
  33.     Epson Stylus Color Printer
  34.     Canon BJC-600/BJC-4000/BJC-70 and BJC-800 BubbleJet Color Printers
  35.       (and Apple StyleWriter 2x00)
  36.  
  37. ### ------------------------- The SPARCprinter ------------------------- ###
  38.  
  39. This section was written by Martin Schulte.
  40.  
  41. Introduction
  42. ------------
  43.  
  44. The SPARCprinter is is connected to SPARCStation via a special SBUS card's
  45. video inferface, the picture is composed on the host and only a bitmap is
  46. send to the printer unit.
  47.  
  48. Together with a SPARCprinter, you always buy (as far as I know) software
  49. that enables you to do postscript-printing on your SPARCPrinter.
  50.  
  51. So, the need for a Ghostscript-Interface to the SPARCPrinter seems low,
  52. but on the other hand some Postscript drawings are not correctly printed
  53. with SUN's software: on some pages occured a thin vertical line of rubbish
  54. (reproducable), on some Mathematica drawings the text at the axes wasn't
  55. rotated.
  56.  
  57. I tried all of these with Ghostscript and always got the expected results.
  58.  
  59. However, replacing proprietary software should never be a bad idea.
  60.  
  61. The problem is that there has yet been no effort to make the SPARCPrinter-
  62. driver behave like a BSD output-filter, I made my tests using the script
  63. mentioned under Installation.
  64.  
  65. Installation
  66. ------------
  67.  
  68. Add sparc.dev to DEVICE_DEVS and compile ghostscript as described in
  69. make.txt.
  70.  
  71. Afterwards, you can use the following script (the way of handling standard
  72. input versus filename-arguments doesn't look very clever, has anyone a
  73. better idea ?) to print if you substitute <GSPATH> by the place where you
  74. installed the ghostscript binary:
  75.  
  76. outcmd1='/vol/local/lib/troff2/psxlate -r'
  77. outcmd2='<GSPATH> -I/home/schulte/gs252 -sDEVICE=sparc -sOUTPUTFILE=/dev/lpvi0 -'
  78.  
  79. if [ $# -eq 0 ]
  80. then
  81.   $outcmd1 | $outcmd2
  82. else
  83.   cat $* | $outcmd1 | $outcmd2
  84. fi
  85.  
  86. Problems
  87. --------
  88.  
  89. Since /dev/lpvi can only be opened for exclusive use, another job having
  90. opened it (engine_ctl_sparc or another ghostscript as the most probable
  91. canidates) will cause to stop ghostscript with "Error: /invalidfileaccess
  92. in --.outputpage--"
  93.  
  94. In case of common printer problems like out of paper, a warning describing
  95. the reason will be printed to stdout, the driver will try to access again
  96. and again each five seconds.
  97.  
  98. Due to a problem with the device-driver (in the kernel) the reason of
  99. printer failure is not always correctly reported to program.  This is the
  100. case at least if you open the top cover (Error in the display: E5).  Look
  101. to the display at the printer if a "Printer problem with unknown reason"
  102. is reported.
  103.  
  104. Fatal errors will cause the print-job to be terminated.
  105.  
  106. ### ------------------------------ End --------------------------------- ###
  107.  
  108. ### ------------------- H-P color inkjet printers ---------------------- ###
  109. ###  (DeskJet 500C, DeskJet 550C, PaintJet, PaintJet XL, PaintJet XL300  ###
  110. ###  and the DEC LJ250 which can operate in a Paintjet-compatible mode)  ###
  111.  
  112. This section was written by George Cameron.
  113.  
  114. Information and tips on usage for the drivers contained in gdevcdj.c
  115. ====================================================================
  116.  
  117. OVERVIEW:
  118.  
  119. There are 6 generic drivers contained in the source module:
  120.  
  121.      1 - cdj500:      HP DeskJet 500C and 540C
  122.      2 - cdj550:      HP DeskJet 550C and 560C
  123.      3 - pjxl300:     HP PaintJet XL300 and DeskJet 1200C
  124.      4 - pjtest:      HP PaintJet
  125.      5 - pjxltest:    HP PaintJet XL
  126.      6 - declj250:    DEC LJ250
  127.  
  128.  All of these drivers have 8-bit (monochrome), 16-bit and 24-bit
  129.      (colour) and for the DJ 550C 32-bit, (colour, cmyk mode)
  130.      options in addition to standard colour and mono drivers.
  131.  It is also possible to set various printer-specific parameters
  132.      from the gs command line, eg.
  133.  
  134.   gs -sDEVICE=cdeskjet -dBitsPerPixel=16 -dDepletion=1 -dShingling=2 tiger.ps
  135.  
  136. NB/ The old names cdeskjet, cdjcolor and cdjmono drivers have been retained;
  137.     however, their functionality duplicates that available using the above
  138.     drivers (and cdeskjet is identical to cdj500), ie. we can use:
  139.  
  140.     gs -sDEVICE=cdj500 -dBitsPerPixel=24 ...    for cdjcolor, and
  141.     gs -sDEVICE=cdj500 -dBitsPerPixel=1  ...    for cdjmono
  142.  
  143.  
  144. DEFAULT PAPER SIZE:
  145.  
  146.  If the preprocessor symbol A4 is defined, the default paper size is the
  147.  European A4 size; otherwise it is the U.S. letter size (8.5"x11"). Other
  148.  paper sizes (including A3 for the PaintJet XL and PaintJet XL300) may be
  149.  specified on the command line as explained in the Ghostscript documentation.
  150.  
  151.  
  152. DEFAULT BITS-PER-PIXEL:
  153.  
  154.  If the preprocessor symbol BITSPERPIXEL is defined as an integer (see below
  155.  for the range of allowable values), this number will be used to define the
  156.  default bits-per-pixel (ie. bit depth) for the generic drivers. If the
  157.  symbol is not defined, the default is set to 24 bits per pixel. It is
  158.  of course still possible to specify the value from the command line, as
  159.  described below. Note also that the cdeskjet, cdjcolor and cdjmono
  160.  drivers are unaffected by setting this symbol, as their default settings
  161.  are predefined to be 1, 3 and 24 respectively.
  162.  
  163.  
  164. DESKJET PHYSICAL LIMITS:
  165.  
  166.  Maximum printing width = 2400 dots = 8". The printer manuals say that the
  167.  maximum recommended printing height on the page is 10.3", but since this
  168.  is obviously not true for A4 paper, and I have been unable to detect any
  169.  problems in printing longer page lengths, this would seem to be a rather
  170.  artificial restriction.
  171.  
  172.  All Deskjets have 1/2" unprintable bottom margin, due to the mechanical
  173.  arrangement used to grab the paper. Side margins are approximately 0.25"
  174.  for US Letter paper, and 0.15" for A4.
  175.  
  176.  
  177. COMMAND LINE PARAMETERS:
  178.  
  179.  Several printer 'properties' have been implemented for these printers.
  180.  Those available so far are all integer quantities, and thus may be
  181.  specified as eg.
  182.  
  183.     gs -dBitsPerPixel=32 -dShingling=1 ... 
  184.  
  185.  which sets the BitsPerPixel parameter to 32 and the Shingling parameter
  186.  to 1.
  187.  
  188.  
  189. BITS-PER-PIXEL:
  190.  
  191.  All of the drivers in gdevcdj.c accept a command line option to set the
  192.  BitsPerPixel property. This gives considerable flexibility in choosing
  193.  various trade-offs between speed/quality/colour etc. The valid numbers
  194.  are:
  195.  
  196.     1:  This is a standard Ghostscript monochrome driver, and uses
  197.         black ink (by installing the separate mono cartridge in
  198.         the case of the DeskJet 500C, or automatically for the
  199.         other printers)
  200.  
  201.     3:  A standard Ghostscript colour driver, using internal
  202.         dithering. This is fast to compute and to print, but
  203.         the clustered dithering can lose some detail and
  204.         colour fidelity.
  205.  
  206.     8:  An 'error-diffusion' monochrome driver which uses
  207.         Floyd-Steinberg dithering to print greyscale images.
  208.         The patterns are much more randomised than with the
  209.         normal clustered dithering, but the data files can
  210.         be much larger and somewhat slower to print.
  211.  
  212.     16: This is a 'cheaper' version of the following (24-bit)
  213.         driver, which generates a Floyd-Steinberg colour dithered
  214.         output using the minimum amount of memory (this may be
  215.         helpful when using IBM PC's when Ghostscript has not
  216.         been compiled using a 32-bit 386-style compiler). The
  217.         quality can be almost as good as the 24-bit version.
  218.  
  219.     24: A high-quality colour driver using Floyd-Steinberg dithering
  220.         for maximum detail and colour range. However it is very
  221.         memory intensive and thus can be slow to compute (and it
  222.         tends to produce rather larger raw data files, so they
  223.         can also be slower to print).
  224.  
  225.     32: This is for the DeskJet 550C only, which uses the black
  226.         cartridge and the colour cartridge simultaneously (ie.
  227.         CMYK printing). This printer can be both faster and give
  228.         higher quality than the DeskJet 500C, because of the
  229.         true black ink. (Note that the 24-bit mode also permits
  230.         CMYK printing on this printer, and uses less memory. Any
  231.         differences between 24-bit and 32-bit should be very small.)
  232.  
  233.  
  234. DESKJET PROPERTIES:
  235.  
  236.  The addional properties available for the DeskJets are:
  237.  
  238.     BlackCorrect    (int)     /* Colour correction to give
  239.                    * better blacks when using the DJ500C
  240.                    * in colour mode, eg. the default of 4
  241.                    * reduces the cyan component to 4/5 
  242.                    * Range accepted: 0 - 9 (0 = none) */
  243.     Shingling   (int)     /* Interlaced, multi-pass printing 
  244.                                * 0 = none, 1 = 50%, 2 = 25%, 2 is
  245.                    * best & slowest */
  246.     Depletion   (int)     /* 'Intelligent' dot-removal 
  247.                            * 0 = none, 1 = 25%, 2 = 50%, 1 best
  248.                    * for graphics? 
  249.                    * Use 0 for transparencies */
  250.  
  251. PAINTJET XL300/PAINTJET XL PROPERTIES:
  252.  
  253.     PrintQuality    (int)     /* Mechanical print quality
  254.                    * -1 = fast, 0 = normal, 1 = presentation
  255.                    * Fast mode reduces ink usage and uses
  256.                    * single-pass operation for some media
  257.                    * types. Presentation uses more ink and
  258.                    * max number of passes, ie. slowest
  259.                    * printing for highest quality */
  260.     RenderType  (int)     /* 0 = driver does dithering
  261.                    * 1 = snap to primaries
  262.                    * 2 = snap black -> white, others to black
  263.                    * 3 = ordered dither
  264.                    * 4 = error diffusion
  265.                    * 5 = monochrome ordered dither
  266.                    * 6 = monochrome error diffusion
  267.                    * 7 = cluster ordered dither
  268.                    * 8 = monochrome cluster ordered dither
  269.                    * 9 = user-defined dither (not supported)
  270.                    * 10 = monochrome user-defined dither ns. */
  271.  
  272. PAINTJET PROPERTIES:
  273.  
  274.     No additional properties
  275.  
  276.  
  277. GAMMA CORRECTION:
  278.  
  279.  One consequence of using Floyd-Steinberg dithering rather than Ghostscript's
  280.  default clustered ordered dither is that it is much more obvious that the
  281.  ink dots are rather larger on the page than their nominal 1/180" or 1/300"
  282.  size (clustering the dots tends to minimise this effect). Thus it is often
  283.  the case that the printed result is rather too dark. A simple empirical
  284.  correction for this may be achieved by preceding the actual postscript
  285.  file to be printed by a short file which effectively sets the gamma for
  286.  the device, eg.
  287.  
  288.  gs ... gamma.ps colorpic.ps -c quit
  289.  
  290.  where gamma.ps is
  291.  
  292. %!
  293. {0.333 exp} dup dup currenttransfer setcolortransfer
  294.  
  295.  This example sets the gamma for r, g, and b to 3, which seems to work
  296.  reasonably well in practice.
  297.  
  298.  
  299. GENERAL TIPS:
  300.  
  301.  For all the above printers, the paper is critically important to the 
  302.  final results. Smoother, less fibrous paper is generally better (and
  303.  suggested types are given in the printer manuals). In particular, the
  304.  special ink-jet paper can make a big difference; the colours are 
  305.  brighter, but most importantly, there is almost no colour bleed, even 
  306.  with adjacent areas of very heavy inking. Similarly, the special coated
  307.  transparencies also work well (and ordinary transparencies do not work
  308.  at all!)
  309.  
  310.  The unix-lpr.sh provides one example of setting up a multi-option
  311.  colour postscript lpr queue on Unix systems, and includes the ability
  312.  to choose a range of different colour options and printer accounting
  313.  and error logging.
  314.  
  315.  
  316. CAVEAT EMPTOR!:
  317.  
  318.  It is not always easy for me to test all of these drivers, as the only
  319.  colour printer I have here is the DeskJet 500C. I rely on others testing
  320.  drivers for the additional machines and reporting their findings back to
  321.  me. 
  322.  
  323. HP's 600x300 dpi resolution-enhanced mode for inkjet printers
  324. =============================================================
  325.  
  326. This feature is available on HP's more recent inkjet printers,
  327. including the Deskjet 520 (mono) 540 (mono or colour) and 560C (mono
  328. and colour).
  329.  
  330. The colour and monochrome drivers for the HP deskjet 550c are
  331. (probably) the best you will get for use with ghostscript, for the
  332. following reasons:
  333.  
  334. These printers do not offer true 600x300 dpi resolution. Those that
  335. print in colour are strictly 300x300 dpi in colour mode, while in mono
  336. mode there is a pseudo 600x300 dot mode, with the restriction that you
  337. can't print two adjacent dots. Thus, in effect what you have is 600 dpi
  338. dot positioning, but on average you don't get more dots per line.
  339.  
  340. What this does give is the possibility to have eg. sharper character
  341. outlines, as you can place dots on the edges nearer to their ideal
  342. positions - this is why it is worth doing.
  343.  
  344. However, HP will not support user-level programming of this
  345. resolution-enhanced mode, one reason being that (I understand) all the
  346. dot spacing has to be done by the driver, and if you get it wrong, you
  347. can actually damage the print head.
  348.  
  349. To summarise, you may lose a smidgin of (potential) text clarity using
  350. the 550c drivers (cdj550, cdjcolor, cdjmono etc.), but other than that,
  351. they are the ones for the job.
  352.  
  353. ### ------------------------------ End --------------------------------- ###
  354.  
  355. ### ------------------- Apple Dot Matrix Printer  ---------------------- ###
  356.  
  357. This section was written by Mark Wedel.
  358.  
  359.  The Dot Matrix Driver (DMP) driver is a simple driver I wrote.  It
  360. could more more efficient, but it seems to print the images fine.
  361.  
  362.  The Dot Matrix Printer was a parallel predecessor to the Imagewriter
  363. printer.  As far as I know, the Imagewriter commands are a superset
  364. to those of the Dot Matrix printer, so the driver should work fine at
  365. generating output that can be printed on Imagewriters.
  366.  
  367.  A few notes (from the gdevadmp.c file):
  368.  
  369.  * To print out images, it sets the printer for unidirection printing
  370.  * and 15 cpi (120 dpi). IT sets line feed to 1/9 of an inch (72 dpi).
  371.  * When finished, it sets things back to bidirection print, 1/8" line
  372.  * feeds, and 12 cpi.  There does not appear to be a way to reset
  373.  * things to initial values.
  374.  *
  375.  * This code does not set for 8 bit characters (which is required). It
  376.  * also assumes that carriage return/newline is needed, and not just
  377.  * carriage return.  These are all switch settings on the DMP, and
  378.  * I have configured them for 8 bit data and cr only.
  379.  *
  380.  * You can search for the strings Init and Reset (in devdemp.c) to find the
  381.  * strings that set up the printer and clear things when finished, and change
  382.  * them to meet your needs.
  383.  *
  384.  * Also, you need to make sure that the printer daemon (assuming unix)
  385.  * doesn't change the data as it is being printed.  I have set my
  386.  * printcap file (sunos 4.1.1) with the string:
  387.  * ms=pass8,-opost
  388.  * and it works fine.
  389.  
  390.  Mark Wedel
  391. master@cats.ucsc.edu
  392.  
  393. ### ------------------------------ End --------------------------------- ###
  394.  
  395. ### ------------------ The Epson Stylus Color printer ------------------ ###
  396. /*
  397.  Epson Stylus-Color Driver, contributed by Gunther Hess (address: see below)
  398.  
  399. I N T R O D U C T I O N
  400. =======================
  401. This documentation accompanies version 1.90 of the stcolor-driver.
  402. Compared to version 1.21 (gs3.53) there are just a few, but somehow
  403. important chages:
  404.  
  405.  - Default: noWeave escpBand=1 (-> default works with all known models)
  406.  - added Parameter "Softweave" (useful only with Original STC and PRO-Series)
  407.  - added Compile-Option (-DSTC_SIGNAL) to catch interrupts during printing
  408.    (thanks to Frederic Loyer)
  409.  - compatibility with ansi2knr
  410.  - compatibility with 64Bit Processors
  411.  - clarification of usage with Pro-XL and Stylus Color II
  412.  
  413. A Note on the Version-Numbering: Version 1.xx comes to it's end. 
  414. Any 1.xx > 1.90 will have only Bug-Fixes. Maybe that Version 2.xx
  415. comes to life, if this is the case it will include full support of
  416. the newer models.
  417.  
  418. U S A G E
  419. =========
  420. This driver is selected with "-sDEVICE=stcolor" and produces output for an
  421. Epson Stylus-Color at 360DpI resolution by default, but it can do much
  422. more with this printer and with significantly better quality, than with
  423. the default-mode and it can also produce code for the monochrome-versions
  424. of this printer.
  425.  
  426. This can be achieved either via command-line options or via ghostscript-input.
  427. For convienience a Postscript-File is supplied, that can be used as initial
  428. inputfile. Thus, assumed that ghostscript is invoked via "gs" on your computer,
  429. try the following command:
  430.  
  431.     gs -sDEVICE=stcolor -rXDPIxYDPI stcolor.ps ... (e.g.: your input-files)
  432.  
  433. were XDPI is one of 180/360/720 and YDPI is one of (90/)180/360/720. The result
  434. should be significantly better, you may use "stcolor.ps" with other devices
  435. too, but I do not recommend this, since it does nothing then. "stcolor.ps"
  436. should be available with binary distributions and should reside in the
  437. ghostscript input-directory. Thus if ghostscript is part of your
  438. printer-spooler, you can insert
  439.  
  440.     (stcolor.ps) findlibfile { pop run } if pop
  441.  
  442. to the files you want to run through the improved algorithms and you may want
  443. to adapt this file to your specific needs. The methods and options for this
  444. are described here, but this description is restricted to the gs-options, while
  445. their manipulation at the Postscript-level is documented in "language.txt" and
  446. in the mentioned "stcolor.ps".
  447.  
  448. Next thing is to explain the options (as written on my unix-system).
  449. The order is somehow related to their use during the printing-Process:
  450.  
  451.   -dUnidirectional      - Force unidirectional printing,
  452.                           recommended for transparencies
  453.  
  454.   -dMicroweave          - enable the printers "microweave"-feature.
  455.   -dnoWeave             - disable any Weaving, overrides -dMicroweave
  456.   -dSoftweave           - enable internal weaving of the driver.
  457.  
  458. *   Weave-Note: Softweave works *ONLY* with the original Stylus-Color
  459. *               and the PRO-Series. 
  460.  
  461.   -sDithering="name"    - select another dithering-algorithm, available are:
  462.               "gscmyk"    : fast color-output, with CMYK-ProcessColorModel [D]
  463.               "gsmono"    : fast black & white output
  464.               "gsrgb"     : fast color-output, with RGB-ProcessColorModel
  465.               "fsmono"    : Floyd-Steinberg, Monochrome
  466.               "fsrgb"     : Floyd-Steinberg, with RGB-ProcessColorModel
  467.                             (Almost identical to cdj550/mjcxxx-Algorithm)
  468.               "fsx4"      : Floyd-Steinberg, with CMYK-ProcessColorModel
  469.                             (shares code with fsmono & fsrgb, but is
  470.                              algorithmically really bad)
  471.               "fscmyk"    : Floyd-Steinberg, with CMYK-ProcessColorModel
  472.                             and proper modifications for CMYK
  473.               "hscmyk"    : modified Floyd-Steinberg with CMYK-Model
  474.                             ("hs" stands for "hess" nor for "high speed",
  475.                              but the major difference to "fscmyk" is speed)
  476.               "fs2"       : algorithm by Steven Singer (RGB)
  477.                             should be identical to escp2cfs2.
  478.  
  479.  -dBitsPerPixel=1...32    - number of bits used for pixel-storage, the larger
  480.                             the value, the better the quality - at least in
  481.                             theory. In fsrgb one can gain some speed, when
  482.                             restricting to 24 Bits, rather than the default
  483.                             of 30.
  484.  
  485.  -dFlag0                  - causes some algorithms to select a uniform
  486.                             initialisation rather than a set of random-values.
  487.                             May yield "sharper" image-impression at the
  488.                             cost of "dithering-atrefacts".
  489.                             (applies to hscmyk and all fs-modi, except for fs2,
  490.                              which always uses a constant initialization.)
  491.  
  492.  -dFlag1 ... -dFlag4      - available to future algorithms.
  493.  
  494.  -dColorAdjustMatrix={3/9/16 x float}'
  495.                           - This is a Matrix to adjust the colors. Values should
  496.                             be between -1.0 and 1.0, and the number of
  497.                             values depend on the colormodel used by the
  498.                             selected algorithm. In RGB- and CMYK-modi a matrix
  499.                             with 1.0 on the diagonal produces no transformation.
  500.                             (I could not identify a similar feature at the
  501.                             language-level, so this option was implemented, it
  502.                             is really required, but I don't know reasonable
  503.                             values yet.)
  504.  
  505.  -dCtransfer='{float float ...}', -dMtransfer=..., -dY..., -dK... or
  506.  -dRtransfer='{float float ...}', -dG..., -dB... or
  507.  -dKtransfer='{float float ...}'
  508.                           - which is used, depends on the algorithm, which
  509.                             maybe either either CMYK, RGB or monochrome.
  510.                             The values are arrays of floats in the range from
  511.                             0 to 1.0, which represent the visible
  512.                             color-intensity for the device. One may achieve
  513.                             similar effects with "setcolortransfer" at the
  514.                             language-level, but this takes more time and the
  515.                             underlying-code for the driver-specific parameters
  516.                             is still required. The size of the arrays is
  517.                             arbitrary and the defaults are {0.0 1.0}, which
  518.                             is a linear characteristic, most of the code in
  519.                             "stcolor.ps" are better transfer-arrays.
  520.  
  521.  -dKcoding='{float...}', -dC..., -dM... etc.
  522.                           - this are again arrays between 0.0 and 1.0, and
  523.                             they control the internal coding of the
  524.                             color-values. Clever usage of this arrays may
  525.                             yield further enhancements, but no experience yet.
  526.                             [To be discontinued with version >= 2.x]
  527.  
  528.  -sModel=st800            - causes output to be suitable for the monochrome
  529.                             Stylus 800 (no Weaving, no Color).
  530.  
  531.  -sOutputCode=            - can be either "plain", "runlength" or "deltarow"
  532.                             and changes the ESC/P2 (TM) coding-technique used
  533.                             by the driver. The default is to use the
  534.                             runlength-encoding. "plain" selects uncompressed
  535.                             encoding and yields enormeous amounts of data to
  536.                             generated.
  537.  
  538.  -descp_Band=1/8/15/24    - Number of Nozzles of scanlines used in printing.
  539.                             Useful only with -dnoWeave. Larger Values yield
  540.                             smaller code, but this doesn't increase the
  541.                             Printing-Speed.
  542.  
  543.  -descp_Width=            - Number of Pixels Printed in each scan-Line.
  544.                             (Useful when tuning Margins only, se below)
  545.  
  546.  -descp_Height=           - Length of the entire Page in Pixels
  547.                             (Parameter of "ESC(C" in default initialization)
  548.  
  549.  -descp_Top=              - Top-Margin in scanlines.
  550.                             (1st Parameter of "ESC(c" in default initialization)
  551.  
  552.  -descp_Bottom=           - Bottom-Margin in scanlines.
  553.                             (2nd Parameter of "ESC(c" in default initialization)
  554.  
  555.  -sescp_Init="..."        - Override for the initialization-sequence.
  556.                             (Must set Graphics-Mode-1 & Units)
  557.  
  558.  -sescp_Release="..."     - Overrides the release-sequence. 
  559.                             (ESC @ FF by default)
  560.  
  561.  Valid Resolutions:
  562.    any, ESC/P2 allows in theory, but only the following are
  563.    known to work with most printers:
  564.  
  565.    -r360x360 (Default)
  566.    -r720x720 (not on STC-IIs ? and st800)
  567.  
  568.  Valid Option Combinations: (Stylus I & PRO-Series only)
  569.  
  570.             escp_Band   ?Weave    escp_Band/#Passes
  571.    180x 90  15         no-Weave
  572.    180x180  1 , 8, 24  no/u-Weave      15/2 sWeave
  573.    180x360                             15/4 sWeave
  574.    180x720                             15/8 sWeave
  575.    360x 90  15         no-Weave
  576.    360x180  1,  8, 24  no/u-Weave      15/2 sWeave
  577.    360x360  1,  8, 24  no/u-Weave      15/4 sWeave
  578.    360x720                             15/8 sWeave
  579.    720x 90  15         no-Weave
  580.    720x180                             15/2 sWeave
  581.    720x360                             15/4 sWeave
  582.    720x720  1          no/u-Weave      15/8 sWeave
  583.  
  584. *************************************************************************
  585. *************************************************************************
  586. **                                                                     **
  587. Å**  BEWARE: There are only few validity-checks for parameters. A good **
  588. **          example is "escp_Band": if you set this, the driver tries  **
  589. **          to use your value, even if this value is not supported by  **
  590. **          the printer:                                               **
  591. **                                                                     **
  592. **                     YOU ASKED FOR IT, AND YOU GOT IT!               **
  593. **                                                                     **
  594. *************************************************************************
  595. *************************************************************************
  596.  
  597.  
  598. A P P L I C A T I O N  - N O T E
  599. ================================
  600.  
  601. Quite a bunch of Parameters. Hopefully you never need any of them, besides
  602. feeding "stcolor.ps" to ghostscript in front of your input.
  603.  
  604. After answering some questions over 50 Times, I prepared a STC-FAQ-Collection.
  605. I am currently unable offer this FAQ on the net.
  606. But thanks to Bill Davidson it is available as:
  607.  
  608.     http://www.isisnet.com/bdavidson/gs_stc.FAQ.html
  609.  
  610. And here it comes (as plain text):
  611.  
  612. VERSION:
  613. This FAQ refers to ghostscript > 3.50 with stcolor > 1.20. The former 
  614. release (ghostscript-3.33/stcolor-1.12) used different parameters and 
  615. had some severe bugs. This FAQ is itself version 1.3.
  616.  
  617. TOPIC: Pro XL?
  618. Yes, this driver supports the A3-Size Printer. Simply set the required
  619. pagesize and margins. A simple way to do this, is to specify the
  620. parameter "-sPAPERSIZE=a3" on the commandline or to include the
  621. procedure-call "a3" in the postscript-Prolog section. If you want
  622. to optimize the printable area and/or set the proper Margins, see
  623. topic Margins, PageSize.
  624.  
  625. TOPIC: Margins, PageSize
  626. Different than other drivers, i refuse to add code to the stcolor-driver,
  627. that tries to guess the proper margins or pagesize. This is due to the
  628. fact, that i found that such guessing is usually wrong and needs correction
  629. either in the source or the parameters. The following code can be
  630. inserted to "stcolor.ps" after the line:
  631.  
  632.      mark % prepare stack for "putdeviceprops"
  633.  
  634. And this is the new code:
  635.  
  636. /.HWMargins [9.0 39.96 12.6 9.0]     % Left, Bottom, Right, Top (1/72")
  637. /PageSize   [597.6 842.4]            % Paper, including Marings (1/72")
  638. /Margins [ % neg. Offset to Left/Top in Pixels
  639.    4 index 0 get STCold /HWResolution get 0 get mul 72 div neg
  640.    5 index 3 get STCold /HWResolution get 1 get mul 72 div neg
  641. ]
  642.  
  643. Feel free to change the Values for ".HWMargins" and "PageSize" to match
  644. your needs. The given Values are the defaults from the driver, when 
  645. compiled with "-DA4" set.
  646.  
  647. This Option -or it's omission- may cause trouble: The Stylus Color can 
  648. print exactly 8" or 2880Pixel@360DpI. The remaining paper is the
  649. margin, where the left margin varies only slightly with the papersize,
  650. while the right margin ist significantly increased for wider paper,
  651. such as letter.
  652.  
  653. -> If you are using stcolor > 1.20, compiled without "-DA4", on european
  654.    paper, then the Default-Margin is too large. You need to add the 
  655.    proper ".HWMargins" to the commandline or stolor.ps
  656.  
  657.  
  658. TOPIC: Stylus Color II / IIs and 1500.
  659. First the good news: The driver can print on the Stylus Color II.
  660. And the bad ones:
  661. - According to Epson-Support the driver "abuses" the color-capabilities.
  662.   (See topic "Future Plans" for details.)
  663. - You need some parameters on the command-line (or in stcolor.ps).
  664. - I doubted that it would be usable with the Stylus Color IIs.
  665.   *BUT* it is usable and suffers from the mixing-Problems!!.
  666.  
  667. To make thinks work, you *MUST* disable the drivers internal 
  668. weaving ("Softweave"). This can be done in two ways:
  669.  
  670.        gs .... -dMicroweave ....
  671.  
  672. or
  673.        gs ... -dnoWeave -descp_Band=1 ....
  674.  
  675. [1.90 fixes this "bug" due to a changed default-behaviour]
  676.  
  677. I experienced significantly increased printing speed with the second
  678. variant on the old Stylus Color, when printing mostly monochrome data.
  679.  
  680. TOPIC: Future Plans
  681. Actually i thought, that the driver is finished by now, but an answer
  682. from Epson triggered future development. This was the answer from
  683. Epson-Support:
  684.  
  685. To: Klaus-Gunther Hess
  686. Subject: Help: Need Programming Info for Stylus-(Color)-Printers
  687.  
  688. The differentiation is necessary, as the printers produce the graphics
  689. differently.  To wit:
  690.  
  691.   CMY Class - ( Stylus Color IIs ) The Stylus Color IIs prints color
  692.   graphics with the three different color inks (cyan, magenta, and yellow).
  693.   Also, black is printed using composit black (mixture of CMY).  For high
  694.   quality laser like black,  a separate black ink cartridge should be used.
  695.  
  696.   CMY + K Class - ( Stylus Color II )  This printer has both a CMY and a
  697.   black ink (K)  cartridge installed at the same time.  However, due to the
  698.   nature of the black ink it can not be mixed or overlaid with the color
  699.   inks.  Therefore, when black is needed, composite black is used.
  700.   If the image calls for pure black (e.g., text), the black cartridge is used.
  701.  
  702.   CMYK Class - ( Stylus Color, Stylus Pro and Pro XL )  These printers
  703.   have a mixable black (K) ink.  This ink is compatible with the CMY inks
  704.   and will not bleed when combined or printed next to the CMY inks.
  705.  
  706. Bruce U.
  707. The Epson Connection 
  708.  
  709. Thus I am working on a version, that supports CMY and CMY + K dithering.
  710. Actually there are also some new (*undocumented*) instructions used by
  711. the windows-driver in conjunction withe the Stylus Color II/IIs, that
  712. raises the need for some more "escp_*" Parameters.
  713.  
  714.  
  715. A C K N O W L E D G E M E N T S
  716. ===============================
  717.  
  718. This driver was "copied" from gdevcdj.c (ghostscript-3.12), which was
  719. contributed by:
  720.     George Cameron      - g.cameron@biomed.abdn.ac.ukis
  721.     Koert Zeilstra      - koert@zen.cais.com
  722.     Eckhard Rueggeberg  - eckhard@ts.go.dlr.de
  723.  
  724. Some of the ESC/P2-code was drawn from gdevescp.c, contributed by
  725.     Richard Brown       - rab@eos.ncsu.edu
  726.  
  727. The POSIX-Interrupt-Code is from (Compile-Time-Option -DSTC_SIGNAL)
  728.     Frederic Loyer      - loyer@ensta.fr
  729.  
  730. And several improvements are based on discussions with
  731.     Brian Converse      - BCONVERSE@ids.net
  732.     Bill Davidson       - bdavidson@ra.isisnet.com
  733.     Gero Guenther       - gero@cs.tu-berlin.de
  734.     Jason Patterson     - jason@reflections.com.au
  735.     ? Rueschstroer      - rue@ibe.med.uni-muenchen.de
  736.     Steven Singer       - S.Singer@ph.surrey.ac.uk
  737.  
  738. While I wish to thank all this people mentioned above, they are by no means
  739. responsible for bugs in the stcolor-driver - just for the features.
  740.  
  741. Duisburg 8-May-1996, Gunther Hess
  742.  
  743. up to sometime E-Mail:  gunther@elmos.de
  744. After that time, one should use snail-mail or phone:
  745.  
  746. Gunther Hess                  phone: ++49 203 376273
  747. Richard Wagner Strasse 112
  748. D-47057 Duisburg
  749. Germany
  750.  
  751. R E C O M M E N D A T I O N S
  752. =============================
  753.  
  754. The next section is a contribution from Jason Patterson <jason@reflections.com.au>
  755. who evaluated a previous version (1.17). GhostScript was invoked as follows:
  756.  
  757.    gs -sDEVICE=stcolor [-r720x720] -sDithering=... -sOutputFile=escp.out \
  758.       stcolor.ps whatsoever.ps
  759.  
  760. where "..." is the name of the desired algorithm. "stcolor.ps" was omitted
  761. for the gs-algorithms (gsmono, gsrgb and gscmyk), for which it is useless
  762. *and* it would not allow the selection of "gscmyk".
  763.  
  764. So here comes a very truncated version of Jasons text:
  765.  
  766.              COLOR DITHERING EXPERIMENTS with gdevstc-1.21
  767.              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  768. Here's a bit of feedback about the EPSON Stylus Color driver's different
  769. dithering methods, based on a little experiment using 4 good quality
  770. scanned images of quite varied nature.
  771.  
  772. Here is a summary of the results of the four experiments...
  773.  
  774.  
  775.  gsmono: Pretty much what you'd expect from a mono ordered pattern. Looks
  776.          like what a lot of mono laser printers produce.
  777.  
  778.  fsmono: Excellent for monochrome.
  779.  
  780.  gscmyk: Not very good, but then you'd expect that from an ordered pattern.
  781.  
  782.  gsrgb:  A little better than gscmyk. More consistent looking.
  783.  
  784.  fs2:    Good, but not quite as good as fsrgb. Gets the brightness wrong,
  785.          too light at 720dpi, too dark at 360dpi.
  786.  
  787.  fsrgb:  Very good, but a little too dark and has a slight blue tint.
  788.  
  789.  hscmyk: Excellent. Slightly better than fsrgb and fs2. Better than fscmyk on
  790.          some images, almost the same on most.
  791.  
  792.  fscmyk: Best. Very, *very* slightly better than hscmyk. On some images,
  793.          nearly as good as the EPSON demos (which were done with the
  794.          MS-Windows driver). 
  795.  
  796.  Overall Visual Quality (out of ten):
  797.  
  798.   gsmono |*********
  799.   fsmono |*****************
  800.          |
  801.   gscmyk |********
  802.   gsrgb  |*********
  803.   fs2    |****************
  804.   fsrgb  |*****************
  805.   hscmyk |******************
  806.   fscmyk |******************
  807.          +---------------------
  808.          0 1 2 3 4 5 6 7 8 9 10
  809.  
  810.  best-to-worst order:  color: fscmyk hscmyk fsrgb fs2 gsrgb gscmyk
  811.                         mono: fsmono gsmono
  812.  
  813.  
  814. SANITY NOTE: The above results are only from *four* images, a total of 24
  815.              printouts (8 on 720dpi paper, 16 on plain paper). Your results
  816.              will almost certainly vary, and your standards might not be
  817.              the same as mine, so use these results as a *guide* only, not
  818.              as a formal evaluation.
  819.  
  820. C O L O R - T R A N S F O R M A T I O N
  821. =======================================
  822.  
  823. *NOTE*: Things are changing with version gdevstc > 2.00!
  824.  
  825. In the initial version of the driver, distributed with Ghostscript-3.33,
  826. the parameter "SpotSize" was the only way to manipulate the colors at the
  827. driver-level. According to the parameters enumerated above, this has changed
  828. significantly with version 1.16 and above. This is the result of
  829. an ongoing discussion about dithering-algorithms and "false color" on the
  830. Epson-Stylus-Color. This initiated the transformation of the stcolor-driver
  831. into a framework for different dithering-algorithms, that provides a generalized
  832. interface to the internal Ghostscript-Color-Models and the other data-structures
  833. related to Ghostscript-Drivers.
  834.  
  835. The main thing such a framework should be able to do is to deliver the
  836. values the dithering-algorithm needs and since this influences directly
  837. the optical image impression, this transformation should be adjustable without
  838. the need for recompilation and relinking.
  839.  
  840. In general the process can be described as follows:
  841.  
  842.    ColorAdjustMatrix   Coding                    Transfer
  843.  +---------------------+    +---------------------+    +------------------+
  844.  |  Ghostscript  Color |    | Ghostscript  Raster |    | Dithering  Data  |
  845.  |                     | => | 1/2/4/8/16/24/32Bit | => |   1/3/4x Values  |
  846.  |  1/3/4x16Bit Values |    | for all components  |    | (arbitrary type) |
  847.  +---------------------+    +---------------------+    +------------------+
  848.  
  849. Due to the limitations on raster-storage, information is lost in the first
  850. transformation step, except for the 16Bit Monochrome-Mode. So any color
  851. adjustment should take place before this step and this is where the optional
  852. ColorAdjustMatrix works.
  853.  
  854. The first transformation-step is called "coding" and is controlled by the
  855. ?coding-Arrays. The Decoding-process expands the range of values
  856. pontentially to a larger range than that provided by the initial ghostscript
  857. color-model. It is therefore a reasonable place to make device- and/or
  858. algorithm-specific adjustments. This is the place where the ?transfer-Arrays
  859. are used. Array-Access might be not the fastest method, but its generality
  860. is superior, so this step is always based upon internaly algorithm-specific
  861. array-access. If 8Bits are stored per color-component and if the algorithm
  862. uses bytes too, the second transformation is included within the first, what
  863. saves significant computation-time when printing the data.
  864.  
  865.  
  866. ColorAdjustMatrix
  867. -----------------
  868.  
  869. The driver supports different "ProcessColorModel"-Values, which raises the
  870. need for different color-adjustments. In the following "CAM" stands for
  871. ColorAdjustMatrix:
  872.  
  873.    DeviceGray: (3 Floats):
  874.       if((r == g) && (g == b))
  875.          K' = 1.0 - R;
  876.       else
  877.          K' = 1.0 - CAM[0] * R + CAM[1] * G + CAM[2] * B;
  878.  
  879.       According to the documentation in drivers.txt, the latter should
  880.       never happen.
  881.  
  882.    DeviceRGB: (9 Floats)
  883.       if((r == g) && (g == b))
  884.          R' = B' = G' = R;
  885.       else
  886.          R' = CAM[0]*R + CAM[1]*G + CAM[2]*B;
  887.          G' = CAM[3]*R + CAM[4]*G + CAM[5]*B;
  888.          B' = CAM[6]*R + CAM[7]*G + CAM[8]*B;
  889.  
  890.       The Printer uses always four inks, thus a special treatment of black
  891.       is provided. Algorithms may take special action, if r==g==b. Maybe
  892.       that in future versions Kcoding & Ktransfer become active in RGB-Mode.
  893.  
  894.    DeviceCMYK: (16 Floats)
  895.  
  896.       if((c == m) && (m == y))
  897.          K' = max(C,K);
  898.          C' = M' = Y' = 0;
  899.       else
  900.          K  = min(C,M,Y);
  901.          if((K > 0) && ColorAdjustMatrix_present) { => UCR
  902.             C -= K;
  903.             M -= K;
  904.             Y -= K;
  905.          }
  906.  
  907.          C' = CAM[ 0]*C + CAM[ 1]*M + CAM[ 2]*Y + CAM[ 3]*K;
  908.          M' = CAM[ 4]*C + CAM[ 5]*M + CAM[ 6]*Y + CAM[ 7]*K;
  909.          Y' = CAM[ 8]*C + CAM[ 9]*M + CAM[10]*Y + CAM[11]*K;
  910.          K' = CAM[12]*C + CAM[13]*M + CAM[14]*Y + CAM[15]*K;
  911.  
  912.       Again we have a special black-treatment. "max(C,K)" was introduced
  913.       because of a slight misbehaviour of ghostscript, that delivers
  914.       black under certain circumstances as (1,1,1,0). Normally, when
  915.       no special "Black Seperation" and "Undercolor Removal" procedures
  916.       are defined at the postscript-level, either (c,m,y,0) or (0,0,0,k)
  917.       values are mapped. This would make the extended ColorAdjustMatrix
  918.       quite tedious, thus during mapping black-seperartion is done for
  919.       (c,m,y,0)-Requests and if there is a ColorAdjustMatrix, undercolor-
  920.       removal is used too. In other words the Default-Matrix is:
  921.  
  922.                    1 0 0 1
  923.                    0 1 0 1
  924.                    0 0 1 1
  925.                    0 0 0 1
  926.  
  927.        and it is applied to CMYK-Values with seperated and removed Black.
  928.        Raising the CMY-Coefficients while lowering the K-coefficients
  929.        reduces black and intensifies color. But be careful, even low
  930.        deviations from the default cause drastic changes.
  931.  
  932. If no ColorAdjustMatrix is set, the matrix-computations are skipped. Thus
  933. the transformation reduces to:
  934.  
  935.     - Range-Inversion in Monochrome-Mode
  936.     - Black-Separation in CMYK-Mode
  937.  
  938.  
  939. RGB/CMYK-coding & -transfer and BitsPerPixel
  940. --------------------------------------------
  941.  
  942. This two (groups) of parameters are arrays of floatingpoint-numbers in the
  943. range 0.0 to 1.0. They control the truncation to the desired number of
  944. bits stored in the raster-memory (BitsPerPixel) and the ink-density.
  945.  
  946. The "truncation" may become a nonlinear-function, if any of the ?coding-arrays
  947. are set. Assume the following Ghostscript invocation:
  948.  
  949.     gs -sDEVICE=stcolor -sDithering=fscmyk -dBitsPerPixel=16 \
  950.        -dMcoding='{ 0.0 0.09 0.9 1.0 }' \
  951.                                         -dYtransfer='{ 0.0 0.09 0.9 1.0 }' \
  952.        -dKcoding='{ 0.0 0.09 0.9 1.0 }' -dKtransfer='{ 0.0 0.09 0.9 1.0 }' \
  953.  
  954. We may have ?coding and/or ?transfer, thus four combinations are possible
  955. and this four combinations appear in the given example. The resulting mapping
  956. is given in the following tables, where except for the internal Indices
  957. (4 Components * 4 Bits = 16 BitsPerPixel), all values are normalized to the
  958. Range 0-1. The actual range is 0 to 65535 for the ghostscript-color and
  959. 0 to 16777215 (2^24-1) for the ink-values delivered to the fscmyk-algorithm.
  960. Sorry for the bunch of numbers following, but you may try this example in
  961. conjunction with "stcinfo.ps", what should give you a graphical
  962. printout of the following numbers, when you issue a "showpage"-command:
  963.  
  964.                             CYAN                      MAGENTA
  965.       CI/15 gs_color_values  CI    ink  gs_color_values  CI    ink
  966.       0.000   0.000 - 0.062   0  0.000   -0.123 - 0.123   0  0.000
  967.       0.067   0.063 - 0.125   1  0.067    0.123 - 0.299   1  0.247
  968.       0.133   0.125 - 0.187   2  0.133    0.299 - 0.365   2  0.351
  969.       0.200   0.188 - 0.250   3  0.200    0.365 - 0.392   3  0.379
  970.       0.267   0.250 - 0.312   4  0.267    0.392 - 0.420   4  0.406
  971.       0.333   0.313 - 0.375   5  0.333    0.420 - 0.447   5  0.433
  972.       0.400   0.375 - 0.437   6  0.400    0.447 - 0.475   6  0.461
  973.       0.467   0.438 - 0.500   7  0.467    0.475 - 0.502   7  0.488
  974.       0.533   0.500 - 0.562   8  0.533    0.502 - 0.529   8  0.516
  975.       0.600   0.563 - 0.625   9  0.600    0.529 - 0.557   9  0.543
  976.       0.667   0.625 - 0.687  10  0.667    0.557 - 0.584  10  0.571
  977.       0.733   0.688 - 0.750  11  0.733    0.584 - 0.612  11  0.598
  978.       0.800   0.750 - 0.812  12  0.800    0.612 - 0.639  12  0.626
  979.       0.867   0.813 - 0.875  13  0.867    0.639 - 0.715  13  0.653
  980.       0.933   0.875 - 0.937  14  0.933    0.715 - 0.889  14  0.778
  981.       1.000   0.938 - 1.000  15  1.000    0.889 - 1.111  15  1.000
  982.  
  983. The difference between Cyan and Magenta is the presence of a Coding-Array.
  984. The coding-process must map a range of color-values to each of the 16
  985. component-indices. If no coding-array is given, this is accomplished
  986. by a division with 4096 -equivalent to a right-shift by 12 Bits-. The
  987. final ink-density resides in the given interval and moves form the left to
  988. the right side from 0 to 15. In the Magenta-case, there is a coding array
  989. and the ink-value matches the center of the intervals. But the distribution
  990. of the mapped intervals follows the given Coding-Array and is nonlinear in
  991. the linear color-space of ghostscript.
  992.  
  993. Now let us take a look at the case with Transfer-Arrays:
  994.  
  995.                            YELLOW                      BLACK
  996.       CI/15 gs_color_values  CI    ink  gs_color_values  CI    ink
  997.       0.000   0.000 - 0.062   0  0.000     -0.123-0.123   0  0.000
  998.       0.067   0.063 - 0.125   1  0.018      0.123-0.299   1  0.067
  999.       0.133   0.125 - 0.187   2  0.036      0.299-0.365   2  0.133
  1000.       0.200   0.188 - 0.250   3  0.054      0.365-0.392   3  0.200
  1001.       0.267   0.250 - 0.312   4  0.072      0.392-0.420   4  0.267
  1002.       0.333   0.313 - 0.375   5  0.090      0.420-0.447   5  0.333
  1003.       0.400   0.375 - 0.437   6  0.252      0.447-0.475   6  0.400
  1004.       0.467   0.438 - 0.500   7  0.414      0.475-0.502   7  0.467
  1005.       0.533   0.500 - 0.562   8  0.576      0.502-0.529   8  0.533
  1006.       0.600   0.563 - 0.625   9  0.738      0.529-0.557   9  0.600
  1007.       0.667   0.625 - 0.687  10  0.900      0.557-0.584  10  0.667
  1008.       0.733   0.688 - 0.750  11  0.920      0.584-0.612  11  0.733
  1009.       0.800   0.750 - 0.812  12  0.940      0.612-0.639  12  0.800
  1010.       0.867   0.813 - 0.875  13  0.960      0.639-0.715  13  0.867
  1011.       0.933   0.875 - 0.937  14  0.980      0.715-0.889  14  0.933
  1012.       1.000   0.938 - 1.000  15  1.000      0.889-1.111  15  1.000
  1013.  
  1014. Yellow uses a transfer-array. There is no linear correspondence between
  1015. the color- and the ink-values. This correspondence is defined through the
  1016. given array. In other words: the Transfer-arrays define a nonlinear
  1017. ink-characteristic, what is exactly the same functionaltity, that
  1018. Postscripts "(color)transfer"-function provides.
  1019.  
  1020. While in the case of Yellow, the intervals match the intervals used with Cyan,
  1021. the inetervals used for Black match the Magenta-Intervals, but watch
  1022. the corespondence between the CI/15-values and the Ink-Density for Black:
  1023. This is a linear distribution in the Ink-domian.
  1024.  
  1025. Not a bad idea, I think. Consider the fs2-algorithm: It uses values in
  1026. the range 0-255 (Bytes). If any transfer-array would be supplied alone,
  1027. some of the 256 possible values would never be used and others will be
  1028. used for adjacent intervals several times. Establishing an identical
  1029. coding-array solves this problem, so that the full potential of the
  1030. algorithm is utilized.
  1031.  
  1032. Another useful feature of the coding-arrays is, that they are internally
  1033. normalized to the 0-1 Range. In the 720x720Dpi-Mode the transfer-arrays
  1034. in stcolor.ps limit the Dot-Density to about 50%, thus this arrays end
  1035. at 0.5 (respectively start at 0.5 in the RGB-case). Due to the automatic
  1036. normalization this arrays can be used as coding-arrays too. But of course
  1037. in the fs2-case mentioned above, values from 0-127 will never be deliverd
  1038. to the algorithm, while values 128-255 are delivered for adjacent intervals.
  1039.  
  1040. To clearify the intended use of the three parameters/parameter-groups the
  1041. following statements should be kept in mind:
  1042.  
  1043. - ColorAdjustMatrix is never used, when transferring gray-values. This
  1044.   restricts it to what the name says: Adjustment of Colors e.g. the
  1045.   correction for miscolored ink. Do not use it for staturation or
  1046.   brightness-control.
  1047.  
  1048. - ?transfer-arrays control the values delivered to the driver, which in
  1049.   turn controls the ink-quantity. This arrays should be used for control
  1050.   of saturation and brightness. Maybe that a Postscript-Header for the
  1051.   manipulation of brightness and so on will be provided with future
  1052.   versions. In general this arrays are identical for all inks.
  1053.   If they differ they provide a simpler scheme for color-correction,
  1054.   which is not necessarily faster than the ColorAdjustMatrix.
  1055.  
  1056. - ?coding-arrays control the color-value-intervals mapped to
  1057.   the internal color-indices.
  1058.  
  1059. P R I N T - M O D I
  1060. ===================
  1061.  
  1062. The parameters "Unidirectional", "Microweave", "noWeave",
  1063. "OutputCode", "Model" and the given resolution provide control over the
  1064. data generated for the printer.
  1065.  
  1066. Unidirectional
  1067. --------------
  1068. Simply toggles the unidirectional-mode of the printer. Setting "Unidirectional"
  1069. definitly decreases printing-speed, but may increase the quality. I use
  1070. this for printing tranparencies, where fast head-movement could smear the ink.
  1071.  
  1072. Microweave, noWeave and OutputCode=deltarow
  1073. -------------------------------------------
  1074. The first are two Booleans, what immediatly tells, that 4 combinations are
  1075. possible. Actually only three exist (if you don't count for deltarow):
  1076.  
  1077.      1. Softweave
  1078.      2. Microweave
  1079.      3. noWeave
  1080.  
  1081. First and second are functionally identical, their difference is that either
  1082. the driver or the printer does the job. So the question
  1083.  
  1084.             What is weaving ?
  1085.  
  1086. arises. The Epson Stylus Color has a Head-Assembly that contains two physically
  1087. identifiable Heads. One for Black and one for Cyan/Magenta/Yellow. This
  1088. makes 4 logical Heads, one for each color-component. Each of this four heads
  1089. has several jets at some Y-distance, so several horizontal lines can be printed
  1090. during one pass of the heads. From the experience I think there are 15 Jets
  1091. per color spaced at 1/90".
  1092.  
  1093. So the question arises, how to print at a Y-Resolution of 360Dpi with this
  1094. 90DpI-Jets. Simply by divison, one gets 360/90 = 4, what tells us, that
  1095. 4 Passes of the head-assembly are required to achieve a Y-resolution of
  1096. 360DpI. Weaving is just the scheme how the 15 jets are utilized to print
  1097. adjacent horizontal rows:
  1098.  
  1099.                     Weaving                   noWeave
  1100.     Pass:     1     2     3     4       1     2     3     4
  1101.     0/360"   jet0   -     -     -      jet0   -     -     -
  1102.     1/360"    -    jet1   -     -       -    jet0   -     -
  1103.     2/360"    -     -    jet2   -       -     -    jet0   -
  1104.     3/360"    -     -     -    jet3     -     -     -    jet0
  1105.     4/360"   jet1   -     -     -      jet1   -     -     -
  1106.     5/360"    -    jet2   -     -       -    jet1   -     -
  1107.     6/360"    -     -    jet3   -       -     -    jet1   -
  1108.     ....
  1109.  
  1110. Now let us assume, that the dot-diameter is different for each individual
  1111. jet, but the average among the jets matches the desired resolution. With
  1112. weaving adjacent rows are printed by different jets, thus the some averaging
  1113. takes place. Without weaving adjacent rows are printed by the same jet and
  1114. this makes the dot-diameter-deviations visible as 1/90"-stripes in the printout.
  1115.  
  1116. In Softweave-Mode (the default) the driver sends the data properly arranged to
  1117. the printer, while in Microweave-Mode the printer does the same job. But in
  1118. general the host-processor is much faster than the printers processor and
  1119. thus it is advantageous to let the host do this job. In addition to that, for
  1120. 720DpI 8 Passes are required and the amount of buffer-space required to buffer
  1121. the data for the passes is far beyond the printers memory. SoftWeave requires
  1122. an odd value of "escp_Band", the Stylus Color provides 15 for that.
  1123.  
  1124. "OutputCode" controls the encoding used. In the basic modi, the choice consists
  1125. of "plain" and "runlength". The computation of runlength-encoded data does not
  1126. take much time, at least less than the datatranfer to the printer, thus this
  1127. is the recommended mode and of course the default. With the Stylus Color
  1128. Epson introduced some new encoding principles, namely "tiff" and "deltarow".
  1129. While the first was omitted from this driver, since there were not potential
  1130. advantages found, "deltarow" is available as an option. "Softweave" cannot
  1131. be used with this encoding, so if "OutputCode=deltarow" is set, Microweave
  1132. becomes the default. Maybe that the size of the ESC/P2-code becomes smaller,
  1133. but I have never observed increased printing-speed - things tend to become
  1134. slower with deltarow compared to Softweave.
  1135.  
  1136. Model
  1137. -----
  1138. Some ESC/P2-Printers, such as the Stylus 800, do not offer Microweave or
  1139. the commands required to do Softweave. Setting Model just changes the defaults
  1140. and ommits some parts of the initialization-sequence, which are not compatible
  1141. with the given printer model. Currently only "st800" is supported besides the
  1142. default (stcolor).
  1143.  
  1144.  
  1145. BEWARE: BUGS & PITFALLS
  1146. =======================
  1147.  
  1148. * The given ?coding and ?transfer arrays should be strictly monotonic.
  1149.  
  1150. * It is impossible to change WHITE: that's your paper.
  1151.   Thus R/G/B-transfer should end at 1.0 and C/M/Y/K-transfer should
  1152.   start at 0.0.
  1153.  
  1154. * Usually 8Bits per component yields fastest operation.
  1155.  
  1156. * The ColorAdjustMatrix is not used in the reverse-transformation, which
  1157.   is used, when Gostscript does the dithering (gs*-Modi). Expect funny
  1158.   results.
  1159.  
  1160. * If BitsPerPixel is less than 6, the entire coding/transfer-process
  1161.   does not work. This is always true for the gs*-modi and becomes true
  1162.   for the other modi, if BitsPerPixel is forced to low values.
  1163.  
  1164. * 720x720Dpi-Printing should never select the gs-modi and should always
  1165.   use stcolor.ps. (I prefer 360x720)
  1166.  
  1167. T E S T S (version 1.13 and above)
  1168. ==================================
  1169.  
  1170. This section should give an overview over the performance in terms of
  1171. processing- & printing-time. Printing is done offline (via cp-instruction)
  1172. to measure real printing-speed, since at high-resolutions processing-time
  1173. is in the same order of magnitude and thus may become the limiting factor.
  1174.  
  1175. The various OutputCodes
  1176. -----------------------
  1177.  
  1178. I ran several files though ghostscript and recorded the size of the code,
  1179. the processing time and the printing-time, at least for some of the files.
  1180. Always the following options were used:
  1181.  
  1182.       "-sDEVICE=stcolor -sPAPERSIZE=a4 stcolor.ps - < file.ps"
  1183.  
  1184. (Actually "-sPAPERSIZE=a4" is in my gs_init.ps since I'm a germ.)
  1185.  
  1186. "Softweave" means actually, that nothing else was used, it is the default and
  1187. implies that odd v=40/h=10/m=15 mode (ESC . 1 40 10 15).
  1188.  
  1189. "Microweave" is just "-dMicroweave", which is equivalent to "ESC . 1 10 10 1",
  1190. with full skip-optimization and microweave-activated.
  1191.  
  1192. "deltarow" is the new encoding principle ("ESC . 3 10 10 1") with Microweave on.
  1193. It is activated with "-sOutputCode=deltarow".
  1194.  
  1195. Finally I wanted to see the plain Kathy Ireland and used "-sOutputCode=plain",
  1196. which is just replacing RLE by no encoding, thus "ESC . 0 40 10 15" is
  1197. used then.
  1198. [So sorry ;-)  Kathy was still blue dressed in front of the blue sea on a blue
  1199. air-cushion - nice to see but hard to dither]
  1200.  
  1201. So here are the results:
  1202.  
  1203.               golfer.ps    colorcir.ps      drawing.ps        brief.ps
  1204.  
  1205. deltarow   572751/48.180u 643374/41.690u  90142/46.180u/1:50 178563/49.350u/2:22
  1206. Softweave  559593/46.810u 669966/44.960u 296168/48.160u/1:30 269808/43.320u/1:55
  1207. Microweave 590999/56.060u 754276/42.890u 338885/47.060u/1:50 282314/44.690u/2:22
  1208.  
  1209.                kathy.ps
  1210. deltarow   3975334/111.940u/5:35
  1211. Softweave  3897112/101.940u/3:10
  1212. Microweave 4062829/100.990u/3:15
  1213. plain/soft 5072255/104.390u/3:05
  1214.  
  1215. Evaluation:
  1216.  
  1217. A.) Might be, that I've not choosen the optimal deltarow-code, but even if
  1218.     it saves at lot of bytes, printing-speed is not increased.
  1219.  
  1220. B.) At least the printer prefers plain-kathy. In other words: Sending a
  1221.     1 Megabyte or 20% more data, has no impact on printing speed.
  1222.     [drawing.ps is an exception to this rule: plain prints slower than rle]
  1223.  
  1224. C.) But "unclever" coding -especially with deltarow- can significantly
  1225.     slows down printing. But even if very significant advantages in the
  1226.     size of the code ar achieved, "deltarow" is not competitive.
  1227.     [colorcir.ps shows savings in deltarow, but printing is a mess.]
  1228.  
  1229.  
  1230. Printing-Time related to other options
  1231. --------------------------------------
  1232.  
  1233. Full page halftone images printed, unless otherwise noted.
  1234.  
  1235.   DpI      print-mode    Size   Time comments
  1236. 180x180 mono      -/uni  358KB  1:15
  1237.                   -/bi   358KB  0:45
  1238.               micro/bi   205KB  0:45 (not weaving)
  1239.                soft/bi   179KB  1:25
  1240.         color     -/bi   641KB  2:45
  1241.                soft/bi   556KB  1:32
  1242.  
  1243. 360x360 mono      -/uni  269KB  0:50 (b/w Text)
  1244.                   -/bi   269KB  0:35 (b/w Text)
  1245.               micro/bi   269KB  2:25 (b/w Text)
  1246.                soft/uni  250KB  3:15 (b/w Text)
  1247.                soft/bi   250KB  1:55 (b/w Text)
  1248.         color     -/bi   346KB  1:00 (sparse color-page, visible displacements)
  1249.               micro/bi   346KB  1:50 (sparse color-page, looks buggy - printer?)
  1250.                soft/bi   294KB  1:30 (sparse color-page, O.K.)
  1251.                   -/bi  2218KB  2:45 (visible stripes)
  1252.               micro/bi  5171KB  3:17
  1253.                soft/bi  3675KB  3:05
  1254.  
  1255. 360x720 mono   soft/bi  2761KB  5:40
  1256.         color  soft/bi  7789KB  6:15 (just a small difference!)
  1257.  
  1258. 720x360 color  soft/bi  7182KB  5:40
  1259.  
  1260. 720x720 color micro/bi 14748KB 30:26 (actually beyond printers capabilities)
  1261.                soft/bi 14407KB 11:08
  1262. ### ------------------------------ End --------------------------------- ###
  1263.  
  1264. ### -- The BJC-600/BJC-4000/BJC-70/Stylewriter 2x00, BJC-800 printers -- ###
  1265.  
  1266. This section was written by Yves Arrouye <Yves.Arrouye@marin.fdn.fr>.
  1267.  
  1268.  
  1269. HISTORY
  1270. -------
  1271.  
  1272. The BJC-600 driver was written in the first place by Yoshio Kuniyoshi
  1273. <yoshio@nak.math.keio.ac.jp> and later modified by me, Yves Arrouye
  1274. <Yves.Arrouye@marin.fdn.fr>. We both tried to make it evolve synchronously,
  1275. though Yoshio cannot be reached since a long time.
  1276.  
  1277. The drivers are based on code for the HP printers by George Cameron
  1278. <g.cameron@biomed.abdn.ac.ukis> (in fact, they are in the same file!),
  1279. so he's the first person to thank!
  1280.  
  1281. The 2.00 version of the drivers was a complete rewrite of the driver
  1282. (arguments, optimization, colour handling, in short: everything!) by
  1283. Yves Arrouye. The 2.x release is also the first one to be able to
  1284. use the full width of an A3 paper size...
  1285.  
  1286. With the 2.15 release, PostScript Printer Description (PPD) files for
  1287. the drivers are released. They are not complete at the moment but they
  1288. can be used to drive the printers' main features.
  1289.  
  1290. VERSION INFORMATION
  1291. -------------------
  1292.  
  1293. The BJC-600 driver is version 2.17.00 dated 5/23/96.
  1294. The BJC-800 driver is version 2.17.00 dated 5/23/96.
  1295.  
  1296.  
  1297. COMPILATION NOTES
  1298. -----------------
  1299.  
  1300. Configuration
  1301. -------------
  1302.  
  1303. * Default values for options and other stuff
  1304.  
  1305. Configuration for the drivers can be made by modifying defauts values
  1306. in the file gdevbjc.h or on the compilation line. If you don't do
  1307. that, the drivers use reasonable defaults that make them work "as
  1308. expected".
  1309.   All default values given below are defined in this file if you need
  1310. to change them to customize your installation (a bad idea, better use
  1311. options...).
  1312.  
  1313. * CMYK to RGB color conversion
  1314.  
  1315. By default, the drivers use the same algorithm as Ghostscript to
  1316. convert CMYK colors to RGB. If you prefer to use Adobe formulaes,
  1317. define USE_ADOBE_CMYK_RGB when compiling. (See the top of the
  1318. gdevcdj.c file to see the difference between the two.)
  1319.  
  1320. * Vertical centering of the printable area
  1321.  
  1322. The drivers center the imageable area horizontally, but not vertically
  1323. so that what can be printed does use the most of the output media. If
  1324. you define BJC_DEFAULT_CENTEREDAREA when compiling, then the top and
  1325. bottom margins will be the same, resulting in a (smaller) vertically
  1326. centered imageable area too.
  1327.  
  1328. * Margins
  1329.  
  1330. If you define USE_RECOMMENDED_MARGINS then the top and bottom margins
  1331. will be the same (i.e. BJC_DEFAULT_CENTEREDAREA will be defined for
  1332. you) and these margins will be those recommended by Canon, 12.4 mm.
  1333.   Because margins are a complicated thing (due to the fact that one
  1334. does rely on the mechanical precision of the printer), the drivers do
  1335. something about the bottom margin: by default the bottom margin is
  1336. 9.54 mm for the bjc600 driver and 7 mm for the bjc800 one. If you
  1337. define USE_TIGHT_MARGINS then the bottom margin is 7 mm for both
  1338. drivers (but I never managed to get my own bjc600 print a line on this
  1339. low bound, hence the greater default). Regardless of the presence of
  1340. this define, USE_FIXED_MARGINS will not allow the bjc800 to use the
  1341. lower 7 mm bottom margin, so if you have a problem with the bottom
  1342. margin on a bjc800, just define that (without defining USE_TIGHT_MARGINS,
  1343. of course).
  1344.  
  1345. Compilation
  1346. -----------
  1347.  
  1348. Make sure the bjc600 and/or bjc800 devices are in your DEVICE_DEVS
  1349. variable. That is look in the makefile for your platform and add them
  1350. if necessary. This means for example adding them to the DEVICE_DEVS6
  1351. variable. The line should read something like that:
  1352.  
  1353.     DEVICE_DEVS6=bj10e.dev bj200.dev bjc600.dev bjc800.dev
  1354.  
  1355. Now if you get an error from make saying that it does not know how to
  1356. make bjc800.dev it's because you have an old makefile with only the
  1357. bjc600 device in it. You then have to copy the lines explaining how to
  1358. make bjc800.dev in your makefile. These lines are in devs.mak (under
  1359. the lines for making bjc600.dev) and should go just after the lines
  1360. for making bjc600.dev.
  1361.  
  1362. Testing the margins
  1363. -------------------
  1364.  
  1365. A quick way to be sure that the margins you selected (see above) are
  1366. okay is to print a file whose contents are:
  1367.  
  1368.       %!
  1369.       clippath stroke showpage
  1370.  
  1371. If the margins are okay, you will obtain a rectangle surrounding the
  1372. printable area.
  1373.  
  1374. USE OF THE DRIVERS
  1375. ------------------
  1376.  
  1377. There are two drivers here: the "bjc600" one supports the BJC-600 and
  1378. BJC-4000 (maybe the BJC-70 as well) and the "bjc800" one supports the
  1379. BJC-800 series. When remarks here apply to both drivers, the name
  1380. "bjc" will be used.
  1381.  
  1382. Supported Options and Defaults
  1383. ------------------------------
  1384.  
  1385. (Note: the names "options", "properties" and "parameters" will be used
  1386. to designate the same thing: device parameters that you can change.)
  1387.  
  1388. Preamble: if an option is given an incorrect value, an error will
  1389. occur. Unless stated otherwise, this error will be a rangecheckerror.
  1390.   Options may be set from the gs command-line (using the -d and -s
  1391. switches or other predetermined switches if they have an effect on the
  1392. driver) or using the setpagedevice Level 2 operator if Ghostscript has
  1393. been compiled with the level2 device (it should ;-)). There are *no*
  1394. special-purpose operators as one was able to find in Level 1 printers.
  1395.  
  1396. The default number of bits per pixel for the bjc is 24 (unless you
  1397. change the value of BJC_BITSPERPIXEL) and corresponds to a CMYK
  1398. printing. Supported modes are 1 bpp and 4 bpp (gray levels), 8 bpp, 16
  1399. bpp, 24 bpp and 32 bpp (colours). Colours are preferrably stored in
  1400. the CMYK model (which means that with 16 bpp there are only 16
  1401. different shades of each color, for example) but it is possible to
  1402. store them as RGB color for some depths.
  1403.   Some modes do Floyd-Steinberg dithering while some others don't and
  1404. use the default Ghostscript halftoning (in fact, when halftoning is used
  1405. dithering takes also place but due to the low point density it is
  1406. usually not efficient and thus invisible).
  1407.  
  1408. Here is a short description of each printing mode (expressed in
  1409. bpp/colors):
  1410.  
  1411.   32/4  CMYK Colour printing, Floyd-Steinberg dithering.
  1412.   24/4  Id. (But each primary colour is stored on 6 bits instead of 8.)
  1413.  
  1414.   24/3  RGB colour printing, Floyd-Steinberg dithering. This mode will
  1415.         *not* use the black cartridge (that's why it exists, for when you
  1416.         don't want to use it ;-)). Each primary colour is stored on 8
  1417.         bits as in the 32/4 mode, but black generation and under-color
  1418.         removal are done on the driver side and not by Ghostscript so you
  1419.         do not have any control on it. (This mode is not supported anymore
  1420.         on this driver.)
  1421.  
  1422.   16/4  CMYK colour printing, halftoned by Ghostscript. FS dithering
  1423.         is still visible here (but the halftone patterns are visible
  1424.         too!).
  1425.  
  1426.   8/4   Id. (But each primary colour is stored on 2 bits instead of 4.)
  1427.  
  1428.   8/3   RGB colour printing. This mode is not intended to be
  1429.         used. What I mean is that it should be used only if you 
  1430.     want to use custom halftone screens *and* the halftoning is
  1431.     broken using the 8/4 mode (some versions of gs have this
  1432.     problem).
  1433.  
  1434.   8/1   Gray-levels printing, Floyd-Steinberg dithering.
  1435.  
  1436.   1/1   Gray-levels printing, halftoned by GhostScript.
  1437.  
  1438. These modes are selected using the BitsPerPixel *and* Colors integers
  1439. options (either from the command line or in a PostScript program using
  1440. setpagedevice). See below.
  1441.  
  1442. A note about darkness of what is printed: Canon printers do print dark,
  1443. really. And the Floyd-Steinberg dithering may eventually darken your image
  1444. too. So you may need to apply gamma correction by calling gs as in
  1445.  
  1446.   % gs -sDEVICE=bjc600 gamma.ps myfile.ps
  1447.  
  1448. where gamma.ps changes the gamma correction (here to 3 for all colors):
  1449.  
  1450.   { 0.45 exp } dup dup currenttransfer setcolortransfer
  1451.  
  1452. (0.45 being value giving good results for me, your mileage may vary;
  1453. the bigger the value the lighter the output).
  1454.  
  1455. The drivers support printing at 90 dpi, 180 dpi and 360 dpi. Horizontal and
  1456. vertical resolutions must be the same or a limitcheck error will happen. A
  1457. rangecheck will happen too if the resolution is not 90 * 2**n. (If the
  1458. driver is compiled with -DBJC_STRICT a rangecheck will also happen if
  1459. the resolution is not one of those supported. This is not the case as we
  1460. expect that there may be a 720 dpi bjc someday).
  1461.  
  1462. Here are the various options supported by the bjc drivers, along with
  1463. their type, supported values, effect(s) and usage:
  1464.  
  1465.   BitsPerPixel (int)    Choose the depth of the page. Valid values are
  1466.             1, 8, 16, 24 and 32. Default is 24.
  1467.               Note that when this is set for the first
  1468.             time, the Colors property is automatically
  1469.             adjusted unless it is also specified. Defaults
  1470.             adjustments are show in the table below,
  1471.             default choices are indicated by a star (*).
  1472.               This table gives also the corresponding
  1473.             color models and the rendering method that is
  1474.             visible (GS means Ghostscript halftoning, FS
  1475.             Floyd-Steinberg dithering, and if both are
  1476.             present it means that the dithering of
  1477.             halftones is visible).
  1478.  
  1479.             +-----+--------+---+----------+-------+
  1480.             | Bpp | Colors | * | C. Model | Dith. |
  1481.             +-----+--------+---+----------+-------+
  1482.             |  32 |      4 |   | CMYK     |    FS |
  1483.             +-----+--------+---+----------+-------+
  1484.             |  24 |      4 | * | CMYK     |    FS |
  1485.             |     |      3 |   | RGB      |    FS |
  1486.             +-----+--------+---+----------+-------+
  1487.             |  16 |      4 |   | CMYK     | GS FS |
  1488.             +-----+--------+---+----------+-------+
  1489.             |   8 |      4 | * | CMYK     | GS    |
  1490.             |     |      3 |   | RGB      | GS    |
  1491.             |     |      1 |   | K (CMYK) |    FS |
  1492.             +-----+--------+---+----------+-------+
  1493.             |   1 |      1 | * | K (CMYK) | GS    |
  1494.             +-----+--------+---+----------+-------+
  1495.  
  1496.                 Valid Colors values for allowed
  1497.                      BitsPerPixel values.
  1498.  
  1499.               Also note that automagical change of one
  1500.             parameter depending on the other one does not
  1501.             work in a setpagedevice call. This means that
  1502.             if you want to change BitsPerPixel to a value
  1503.             whose valid Colors values do not include the
  1504.             actual Colors value, you must change Colors
  1505.             too.
  1506.  
  1507.   Colors (int)      Choose the number of color components. Valid
  1508.             values are 1, 3 and 4. Default is 4.
  1509.               This setting cannot be used in a PostScript
  1510.             program, only on Ghostscript's command-line.
  1511.             See ProcessColorModel below for what to use to
  1512.             change the number of colors with PostScript
  1513.             code.
  1514.               Note that setting this property does limit
  1515.             the choices of BitsPerPixel. As for the
  1516.             previous property, its first setting may
  1517.             induce a setting of the "other value" (namely
  1518.             BitsPerPixel, here). Valid combinations are
  1519.             shown in the table below (XX indicates that
  1520.             the combination is valid, ** that this is the
  1521.             default).
  1522.  
  1523.             +--------+------+------------------------+
  1524.             |        |      | BitsPerPixel ok values |
  1525.             | Colors | Type +----+----+----+----+----+
  1526.             |        |      | 32 | 24 | 16 |  8 |  1 | 
  1527.             +--------+------+----+----+----+----+----+
  1528.             |      4 | CMYK | XX | ** | XX | XX |    |
  1529.             |      3 | RGB  |    | ** |    | XX |    |
  1530.             |      1 | K    |    |    |    | XX | ** |
  1531.             +--------+------+----+----+----+----+----+
  1532.  
  1533.                   Valid BitsPerPixel values
  1534.                   for allowed Colors values.
  1535.  
  1536.               Also note that automagical change of one
  1537.             parameter depending on the other one does not
  1538.             work in a setpagedevice call. This means that
  1539.             if you want to change Colors to a value whose
  1540.             valid BitsPerPixel values do not include the
  1541.             actual BitsPerPixel value, you must change
  1542.             BitsPerPixel too.
  1543.  
  1544.   ProcessColorModel (symbol)
  1545.             A symbol taken from /DeviceGray, /DeviceRGB
  1546.             or /DeviceCMYK which can be used to select 1,
  1547.             3 or 4 colors respectively.
  1548.               Note that this parameter takes precedence
  1549.             over the Colors one, and that both affect the
  1550.             same variable of the driver. (See Colors above
  1551.             for values combined with BitsPerPixel.)
  1552.  
  1553.   HWResolution (floats array)  
  1554.             An array of 2 floats giving the horizontal and
  1555.             vertical resolution in dots per inch. Supported
  1556.             values are 90, 180 and 360 and both values
  1557.             must be the same. Default is 360.
  1558.               (On the gs command line, the resolution is
  1559.             changed by saying "-rXDPIxYDPI".)
  1560.  
  1561.   ManualFeed (bool) Indicate that the sheets won't be fed automatically
  1562.             by the printer. Default is false.
  1563.               (Not meaningful on the BJC-600, I fear.)
  1564.  
  1565.   MediaType (string)    Choose the media to print on. Values are chose
  1566.             amongst "PlainPaper", "CoatedPaper",
  1567.             "TransparencyFilm", "Envelope", "Card" and "Other".
  1568.             Default is "PlainPaper".
  1569.               If the chose media is "Envelope", "Card" or
  1570.             "Other", the driver will make the printer go
  1571.             in thick mode automatically regardless of the
  1572.             media weight.
  1573.  
  1574.   MediaWeight (int or null)
  1575.             Choose the weight of the media (in g/m2). Using
  1576.             null indicates that the weight is of no
  1577.                         importance. Default is null.
  1578.               If the specified media weight is greater
  1579.             than 105 (i.e. the value of the compilation 
  1580.                         default BJC???_MEDIAWEIGHT_THICKLIMIT) then
  1581.             the printer will be setup to use thick paper.
  1582.  
  1583.   PrintQuality (string) Choose the quality of printing. For the bjc600
  1584.             driver it can be one of "Normal", "High" and
  1585.             "Draft". For the bjc800 driver it can be one
  1586.             of "Low", "Normal", "High" and "Draft".
  1587.             Default is "Normal" for both drivers.
  1588.               For both drivers, "High" means 200% black and
  1589.             100% cyan, magenta and yellow (on a bjc600 you
  1590.             will get the "Bk+" light).
  1591.               For the bjc600 driver, "Normal" lits the
  1592.             "HQ" light while "Draft" unlits it.
  1593.               For the bjc800 driver, "Low" has the effect
  1594.             of making only two printing passes instead of
  1595.             four (should be twice as fast ;-)). This is
  1596.             what is known as "CN" (Color Normal) mode.
  1597.  
  1598.   DitheringType (string)
  1599.             Choose a dithering algorithm. Actually the
  1600.             only valid values are "Floyd-Steinberg" and
  1601.             "None". "None" is the default for 1/1 print
  1602.             mode, "Floyd-Steinberg" for other modes.
  1603.               At the moment this parameter is read-only,
  1604.             though no error will be generated if one tries
  1605.                         to change it.
  1606.               This parameter is not of much value at the
  1607.             moment and is mainly here to reserve the name
  1608.             for future addition of dithering algorithms.
  1609.  
  1610.   PrintColors (int) Mask for printing color. If 0, use black for
  1611.             any color.
  1612.               Otherwise, the value must be the sum of any
  1613.                 of 1 (cyan), 2 (magenta), 4 (yellow) and 8
  1614.             (black), indicating which colors will be used
  1615.             for printing.
  1616.               When printing colour, only those colour
  1617.             specified will be printed (this means that
  1618.             some planes will be missing).
  1619.               When printing grays, black is used if it is
  1620.             present in the PrintColors; otherwise, the
  1621.             data is printed by superimposing each
  1622.             requested color.
  1623.             
  1624.   MonochromePrint (bool)
  1625.             *For bjc600 only*. Substitute black for Cyan,
  1626.             Magenta and Yellow when printing (useful for
  1627.             getting some monochrome output of a dithered
  1628.             printing for example). Default is false.
  1629.               This is a hardware mechanism as opposed to
  1630.             the previous software one. I think that using
  1631.             this or setting PrintColors to 0 will give the
  1632.             same results.
  1633.  
  1634. Note that the MediaType and ThickMedia options will be replaced by the use
  1635. of the device InputAttributes and OutputAttributes as soon as possible.
  1636.  
  1637. Please note too that the print mode may be reset at the start of a print,
  1638. not at the end. This is the expected behaviour. If you need to reset
  1639. the printer to its default state, simply print a file that does just a
  1640. showpage.
  1641.  
  1642. Device Informations
  1643. -------------------
  1644.  
  1645. Here are other informations published by the driver that you will find
  1646. in the deviceinfo dictionary:
  1647.  
  1648.   OutputFaceUp (bool)   This has the boolean value true, indicating that
  1649.             the sheets are stacked face up.
  1650.  
  1651.   Version (float)   In the form M.mmpp where M is the major version,
  1652.             mm the bjc drivers minor version and pp the specific
  1653.             driver minor version (that is, M.mm will always be
  1654.             the same for the bjc600 and bjc800 drivers).
  1655.  
  1656.   VersionString (string)
  1657.             A string that gives the version info plus
  1658.             other indications. At the moment, things like
  1659.             'a' or 'b' may follow the version to indicate
  1660.             alpha or beta versions and the date of the
  1661.             last change to this version is given in the
  1662.             form MM/DD/YY (no,  it won't adapt to your
  1663.             locale!).
  1664.  
  1665. Hardware Margins
  1666. ----------------
  1667.  
  1668. The BJC printers have top and bottom hardware margins of 3 mm and 7.1
  1669. mm respectively (Canon says 7 mm but this is not usable because of
  1670. the rounding of paper sizes to PostScript points).. The left margin is
  1671. 3.4 mm for A4 and smaller paper sizes, 6.4 mm for US paper sizes,
  1672. envelopes and cards. It is 4.0 mm for A3 paper on the BJC-800.
  1673.  
  1674. The maximum printing width of a BJC-600 printer is 203 mm, in any event.
  1675. The maximum printing width of a BJC-800 printer is 289 mm on A3 paper,
  1676. and 203 mm on letter and A4 paper.
  1677.  
  1678.  
  1679. POSTSCRIPT PRINTER DESCRIPTION FILES
  1680. ------------------------------------
  1681.  
  1682. The BJC600.PPD and BJC800.PPD files (whose long names are, respectively,
  1683. Canon_BubbleJetColor_600.ppd and Canon_BubbleJetColor_800.ppd) are PPD
  1684. files driving the features of the bjc600 and bjc800 drivers.
  1685.  
  1686. They can be used for example on NEXTSTEP systems (presumably on
  1687. OpenStep systems too) and on Unix systems with Adobe's TranScript and
  1688. pslpr (not tested).
  1689.  
  1690. The files are not complete at the moment. Please note too that
  1691. NEXTSTEP's printing interface does not correctly enforce constraints
  1692. specified in these files (in UIConstraints descriptions): you must
  1693. force yourself to use valid combinations of options.
  1694.  
  1695. Customization of the PPD files
  1696. ------------------------------
  1697.  
  1698. By default the files say that the paper used is US Letter, and they
  1699. use a normalized transfer function.
  1700.   If you choose to use A4 printing by default, you must replace Letter by
  1701. A4 in lines that match the '\*Default.*: Letter' pattern.
  1702.   Some versions of Ghostscript have problems with normalized colors,
  1703. which makes them add magenta in gray levels. If you have this problem,
  1704. replace the '*DefaultTransfer: Normalized' line by the alternate (correct)
  1705. '*DefaultTransfer: Null' line.
  1706.  
  1707. Also note that the 'Thick Media' option is implemented by choosing a
  1708. value of 120 or 80 (for thick and thin media respectively) for the
  1709. MediaWeight feature of the drivers. If you ever change the threshold
  1710. for thick media in the driver code, you may need to change the values
  1711. in the PPD files too.
  1712.  
  1713. All customization should be done using the '*Include: ' feature of PPD
  1714. files so that your local changes will be kept if you get an update of
  1715. these PPD files.
  1716.  
  1717.  
  1718. OTHER INFORMATIONS
  1719. ------------------
  1720.  
  1721. Reporting Problems
  1722. ------------------
  1723.  
  1724. When you report a problem please be as descriptive as possible, and
  1725. please send information that can be used to reproduce the problem.
  1726.   Please don't forget to tell me which driver you use and its
  1727. version. Version information can be found in this file or preferrably
  1728. by issuing the following command in a shell:
  1729.  
  1730.     % echo "currentpagedevice /VersionString get ==" | \
  1731.         gs -q -sDEVICE=bjc600 -
  1732.  
  1733. (the % doesn't count as part of the command and the device name should
  1734. be the device you really use).
  1735.  
  1736. Contact Address
  1737. ---------------
  1738.  
  1739. If you have problems with this driver (or if you are extremely
  1740. satisfied with it) you may email me at Yves.Arrouye@marin.fdn.fr.
  1741.  
  1742. Acknowledgements
  1743. ----------------
  1744.  
  1745. I am particularly grateful to Yoshio Kuniyoshi <yoshio@nak.math.keio.ac.jp>
  1746. without whom I'd never make these drivers and also to Peter L. Deutsch
  1747. <ghost@aladdin.com> who answered *all* my (often silly) questions about
  1748. the drivers interface used by Ghostscript.
  1749.   Thanks also to the people who volunteered to beta-test the v2.x
  1750. BJC drivers; David Gaudine <david@donald.concordia.ca>, Robert M. Kenney
  1751. <rmk@unh.edu>, James McPherson <jmcphers@attila.stevens-tech.edu> and
  1752. Ian Thurlbeck <ian@stams.strath.ac.uk> (in an alphabetic listing) were
  1753. particularly helpful by discovering bugs and helping find out exact
  1754. paper margins on printers I don't have access to.
  1755.   And *many* thanks to Klaus-Gunther Hess <gunther@elmos.de> for
  1756. looking at the dithering code and devising a good CMYK dithering
  1757. algorithm for the Stylus Color, which I then adapted to the code of
  1758. these drivers.
  1759.  
  1760. ### ------------------------------ End --------------------------------- ###
  1761.  
  1762. ### ---------------- MS-Windows DIB printer driver ----------------- ###
  1763.  
  1764. This section was written by Russell Lang, 4 September 1996
  1765.  
  1766. The mswinpr2 device uses MS-Windows printer drivers and should work
  1767. with any printer with DIB raster capabilities.
  1768. The printer resolution cannot be selected using PostScript commands 
  1769. from Ghostscript; use the printer setup in the Control Panel instead.
  1770.  
  1771. If no Windows printer name is specified in -sOutputFile, Ghostscript
  1772. will prompt for a Windows printer using the standard Print Setup
  1773. dialog box.  You must set the orientation to Portrait, and you must
  1774. set the page size to that expected by Ghostscript.  Failure to do so 
  1775. will result in the image being clipped. Ghostscript sets the physical 
  1776. device size to that of the Windows printer driver, but it does not 
  1777. update the PostScript clipping path.
  1778.  
  1779. If a Windows printer name is specified in -sOutputFile, using 
  1780. the format "\\spool\printer_name", e.g.
  1781.   -sOutputFile="\\spool\Apple LaserWriter II NT"
  1782. then Ghostscript will attempt to open the Windows printer without
  1783. any prompts (except of course if the printer is connected to FILE:).
  1784. Ghostscript attempts to set the Windows printer page size and orientation
  1785. to match that expected by Ghostscript, but doesn't always succeed.
  1786. The following algorithm is used:
  1787. - If the requested page size matches one of the Windows standard
  1788.   page sizes +/- 2mm, ask for that standard size.
  1789. - Otherwise if the requested page size matches one of the Windows 
  1790.   standard page sizes in landscape mode, ask for that standard size
  1791.   in landscape.
  1792. - Otherwise ask for the page size by specifying its dimensions only.
  1793. - If using Windows NT, select a form that matches the page size.
  1794.   (This isn't working at the moment)
  1795. - Merge the above requests with the defaults.
  1796.   If the printer driver ignores the requested paper size, no
  1797.   error will be generated.  It will print on the wrong paper size.
  1798. - Open the Windows printer with the merged orientation and size.
  1799. The Ghostscript physical device size will be updated to match
  1800. the Windows printer physical device.
  1801.  
  1802. ### ------------------------------ End --------------------------------- ###
  1803.  
  1804.