home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / sharewar / dos / program / gs300sr1 / gs300sr1.exe / DEVICES.DOC < prev    next >
Text File  |  1994-07-27  |  14KB  |  360 lines

  1.    Copyright (C) 1992, 1993, 1994 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.doc, 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 500C & 550C
  29.     HP PaintJet, XL, and XL300
  30.     DEC LJ250
  31.     Apple Dot Matrix Printer (and Imagewriter)
  32.  
  33. ### ------------------------- The SPARCprinter ------------------------- ###
  34.  
  35. This section was written by Martin Schulte.
  36.  
  37. Introduction
  38. ------------
  39.  
  40. The SPARCprinter is is connected to SPARCStation via a special SBUS card's
  41. video inferface, the picture is composed on the host and only a bitmap is
  42. send to the printer unit.
  43.  
  44. Together with a SPARCprinter, you always buy (as far as I know) software
  45. that enables you to do postscript-printing on your SPARCPrinter.
  46.  
  47. So, the need for a Ghostscript-Interface to the SPARCPrinter seems low,
  48. but on the other hand some Postscript drawings are not correctly printed
  49. with SUN's software: on some pages occured a thin vertical line of rubbish
  50. (reproducable), on some Mathematica drawings the text at the axes wasn't
  51. rotated.
  52.  
  53. I tried all of these with Ghostscript and always got the expected results.
  54.  
  55. However, replacing proprietary software should never be a bad idea.
  56.  
  57. The problem is that there has yet been no effort to make the SPARCPrinter-
  58. driver behave like a BSD output-filter, I made my tests using the script
  59. mentioned under Installation.
  60.  
  61. Installation
  62. ------------
  63.  
  64. Add sparc.dev to DEVICE_DEVS and compile ghostscript as described in
  65. make.doc.
  66.  
  67. Afterwards, you can use the following script (the way of handling standard
  68. input versus filename-arguments doesn't look very clever, has anyone a
  69. better idea ?) to print if you substitute <GSPATH> by the place where you
  70. installed the ghostscript binary:
  71.  
  72. outcmd1='/vol/local/lib/troff2/psxlate -r'
  73. outcmd2='<GSPATH> -I/home/schulte/gs252 -sDEVICE=sparc -sOUTPUTFILE=/dev/lpvi0 -'
  74.  
  75. if [ $# -eq 0 ]
  76. then
  77.   $outcmd1 | $outcmd2
  78. else
  79.   cat $* | $outcmd1 | $outcmd2
  80. fi
  81.  
  82. Problems
  83. --------
  84.  
  85. Since /dev/lpvi can only be opened for exclusive use, another job having
  86. opened it (engine_ctl_sparc or another ghostscript as the most probable
  87. canidates) will cause to stop ghostscript with "Error: /invalidfileaccess
  88. in --.outputpage--"
  89.  
  90. In case of common printer problems like out of paper, a warning describing
  91. the reason will be printed to stdout, the driver will try to access again
  92. and again each five seconds.
  93.  
  94. Due to a problem with the device-driver (in the kernel) the reason of
  95. printer failure is not always correctly reported to program.  This is the
  96. case at least if you open the top cover (Error in the display: E5).  Look
  97. to the display at the printer if a "Printer problem with unknown reason"
  98. is reported.
  99.  
  100. Fatal errors will cause the print-job to be terminated.
  101.  
  102. ### ------------------------------ End --------------------------------- ###
  103.  
  104. ### ------------------- H-P color inkjet printers ---------------------- ###
  105. ###  (DeskJet 500C, DeskJet 550C, PaintJet, PaintJet XL, PaintJet XL300  ###
  106. ###  and the DEC LJ250 which can operate in a Paintjet-compatiblme mode) ###
  107.  
  108. This section was written by George Cameron.
  109.  
  110. Information and tips on usage for the drivers contained in gdevcdj.c
  111. ====================================================================
  112.  
  113. OVERVIEW:
  114.  
  115. There are 6 generic drivers contained in the source module:
  116.  
  117.      1 - cdj500:      HP DeskJet 500C
  118.      2 - cdj550:      HP DeskJet 550C
  119.      3 - pjxl300:     HP PaintJet XL300
  120.      4 - pjtest:      HP PaintJet
  121.      5 - pjxltest:    HP PaintJet XL
  122.      6 - declj250:    DEC LJ250
  123.  
  124.  All of these drivers have 8-bit (monochrome), 16-bit and 24-bit
  125.      (colour) and for the DJ 550C 32-bit, (colour, cmyk mode)
  126.      options in addition to standard colour and mono drivers.
  127.  It is also possible to set various printer-specific parameters
  128.      from the gs command line, eg.
  129.  
  130.   gs -sDEVICE=cdeskjet -sBitsPerPixel=16 -dDepletion=1 -dShingling=2 tiger.ps
  131.  
  132. NB/ The old names cdeskjet, cdjcolor and cdjmono drivers have been retained;
  133.     however, their functionality duplicates that available using the above
  134.     drivers (and cdeskjet is identical to cdj500), ie. we can use:
  135.  
  136.     gs -sDEVICE=cdj500 -dBitsPerPixel=24 ...    for cdjcolor, and
  137.     gs -sDEVICE=cdj500 -dBitsPerPixel=1  ...    for cdjmono
  138.  
  139.  
  140. DEFAULT PAPER SIZE:
  141.  
  142.  If the preprocessor symbol A4 is defined, the default paper size is the
  143.  European A4 size; otherwise it is the U.S. letter size (8.5"x11"). Other
  144.  paper sizes (including A3 for the PaintJet XL and PaintJet XL300) may be
  145.  specified on the command line as explained in the Ghostscript documentation.
  146.  
  147.  
  148. DEFAULT BITS-PER-PIXEL:
  149.  
  150.  If the preprocessor symbol BITSPERPIXEL is defined as an integer (see below
  151.  for the range of allowable values), this number will be used to define the
  152.  default bits-per-pixel (ie. bit depth) for the generic drivers. If the
  153.  symbol is not defined, the default is set to 24 bits per pixel. It is
  154.  of course still possible to specify the value from the command line, as
  155.  described below. Note also that the cdeskjet, cdjcolor and cdjmono
  156.  drivers are unaffected by setting this symbol, as their default settings
  157.  are predefined to be 1, 3 and 24 respectively.
  158.  
  159.  
  160. DESKJET PHYSICAL LIMITS:
  161.  
  162.  Maximum printing width = 2400 dots = 8". The printer manuals say that the
  163.  maximum recommended printing height on the page is 10.3", but since this
  164.  is obviously not true for A4 paper, and I have been unable to detect any
  165.  problems in printing longer page lengths, this would seem to be a rather
  166.  artificial restriction.
  167.  
  168.  All Deskjets have 1/2" unprintable bottom margin, due to the mechanical
  169.  arrangement used to grab the paper. Side margins are approximately 0.25"
  170.  for US Letter paper, and 0.15" for A4.
  171.  
  172.  
  173. COMMAND LINE PARAMETERS:
  174.  
  175.  Several printer 'properties' have been implemented for these printers.
  176.  Those available so far are all integer quantities, and thus may be
  177.  specified as eg.
  178.  
  179.     gs -dBitsPerPixel=32 -dShingling=1 ... 
  180.  
  181.  which sets the BitsPerPixel parameter to 32 and the Shingling parameter
  182.  to 1.
  183.  
  184.  
  185. BITS-PER-PIXEL:
  186.  
  187.  All of the drivers in gdevcdj.c accept a command line option to set the
  188.  BitsPerPixel property. This gives considerable flexibility in choosing
  189.  various trade-offs between speed/quality/colour etc. The valid numbers
  190.  are:
  191.  
  192.     1:    This is a standard Ghostscript monochrome driver, and uses
  193.         black ink (by installing the separate mono cartridge in
  194.         the case of the DeskJet 500C, or automatically for the
  195.         other printers)
  196.  
  197.     3:    A standard Ghostscript colour driver, using internal
  198.         dithering. This is fast to compute and to print, but
  199.         the clustered dithering can lose some detail and
  200.         colour fidelity.
  201.  
  202.     8:    An 'error-diffusion' monochrome driver which uses
  203.         Floyd-Steinberg dithering to print greyscale images.
  204.         The patterns are much more randomised than with the
  205.         normal clustered dithering, but the data files can
  206.         be much larger and somewhat slower to print.
  207.  
  208.     16:    This is a 'cheaper' version of the following (24-bit)
  209.         driver, which generates a Floyd-Steinberg colour dithered
  210.         output using the minimum amount of memory (this may be
  211.         helpful when using IBM PC's when Ghostscript has not
  212.         been compiled using a 32-bit 386-style compiler). The
  213.         quality can be almost as good as the 24-bit version.
  214.  
  215.     24:    A high-quality colour driver using Floyd-Steinberg dithering
  216.         for maximum detail and colour range. However it is very
  217.         memory intensive and thus can be slow to compute (and it
  218.         tends to produce rather larger raw data files, so they
  219.         can also be slower to print).
  220.  
  221.     32:    This is for the DeskJet 550C only, which uses the black
  222.         cartridge and the colour cartridge simultaneously (ie.
  223.         CMYK printing). This printer can be both faster and give
  224.         higher quality than the DeskJet 500C, because of the
  225.         true black ink. (Note that the 24-bit mode also permits
  226.         CMYK printing on this printer, and uses less memory. Any
  227.         differences between 24-bit and 32-bit should be very small.)
  228.  
  229.  
  230. DESKJET PROPERTIES:
  231.  
  232.  The addional properties available for the DeskJets are:
  233.  
  234.     BlackCorrect    (int)      /* Colour correction to give
  235.                    * better blacks when using the DJ500C
  236.                    * in colour mode, eg. the default of 4
  237.                    * reduces the cyan component to 4/5 
  238.                    * Range accepted: 0 - 9 (0 = none) */
  239.     Shingling    (int)      /* Interlaced, multi-pass printing 
  240.                                * 0 = none, 1 = 50%, 2 = 25%, 2 is
  241.                    * best & slowest */
  242.     Depletion    (int)      /* 'Intelligent' dot-removal 
  243.                            * 0 = none, 1 = 25%, 2 = 50%, 1 best
  244.                    * for graphics? 
  245.                    * Use 0 for transparencies */
  246.  
  247. PAINTJET XL300/PAINTJET XL PROPERTIES:
  248.  
  249.     PrintQuality    (int)      /* Mechanical print quality
  250.                    * -1 = fast, 0 = normal, 1 = presentation
  251.                    * Fast mode reduces ink usage and uses
  252.                    * single-pass operation for some media
  253.                    * types. Presentation uses more ink and
  254.                    * max number of passes, ie. slowest
  255.                    * printing for highest quality */
  256.     RenderType    (int)      /* 0 = driver does dithering
  257.                    * 1 = snap to primaries
  258.                    * 2 = snap black -> white, others to black
  259.                    * 3 = ordered dither
  260.                    * 4 = error diffusion
  261.                    * 5 = monochrome ordered dither
  262.                    * 6 = monochrome error diffusion
  263.                    * 7 = cluster ordered dither
  264.                    * 8 = monochrome cluster ordered dither
  265.                    * 9 = user-defined dither (not supported)
  266.                    * 10 = monochrome user-defined dither ns. */
  267.  
  268. PAINTJET PROPERTIES:
  269.  
  270.     No additional properties
  271.  
  272.  
  273. GAMMA CORRECTION:
  274.  
  275.  One consequence of using Floyd-Steinberg dithering rather than Ghostscript's
  276.  default clustered ordered dither is that it is much more obvious that the
  277.  ink dots are rather larger on the page than their nominal 1/180" or 1/300"
  278.  size (clustering the dots tends to minimise this effect). Thus it is often
  279.  the case that the printed result is rather too dark. A simple empirical
  280.  correction for this may be achieved by preceding the actual postscript
  281.  file to be printed by a short file which effectively sets the gamma for
  282.  the device, eg.
  283.  
  284.  gs ... gamma.ps colorpic.ps -c quit
  285.  
  286.  where gamma.ps is
  287.  
  288. %!
  289. {0.333 exp} dup dup currenttransfer setcolortransfer
  290.  
  291.  This example sets the gamma for r, g, and b to 3, which seems to work
  292.  reasonably well in practice.
  293.  
  294.  
  295. GENERAL TIPS:
  296.  
  297.  For all the above printers, the paper is critically important to the 
  298.  final results. Smoother, less fibrous paper is generally better (and
  299.  suggested types are given in the printer manuals). In particular, the
  300.  special ink-jet paper can make a big difference; the colours are 
  301.  brighter, but most importantly, there is almost no colour bleed, even 
  302.  with adjacent areas of very heavy inking. Similarly, the special coated
  303.  transparencies also work well (and ordinary transparencies do not work
  304.  at all!)
  305.  
  306.  The unix-lpr.sh provides one example of setting up a multi-option
  307.  colour postscript lpr queue on Unix systems, and includes the ability
  308.  to choose a range of different colour options and printer accounting
  309.  and error logging.
  310.  
  311.  
  312. CAVEAT EMPTOR!:
  313.  
  314.  It is not always easy for me to test all of these drivers, as the only
  315.  colour printer I have here is the DeskJet 500C. I rely on others testing
  316.  drivers for the additional machines and reporting their findings back to
  317.  me. 
  318.  
  319. ### ------------------------------ End --------------------------------- ###
  320.  
  321. ### ------------------- Apple Dot Matrix Printer  ---------------------- ###
  322.  
  323. This section was written by Mark Wedel.
  324.  
  325.  The Dot Matrix Driver (DMP) driver is a simple driver I wrote.  It
  326. could more more efficient, but it seems to print the images fine.
  327.  
  328.  The Dot Matrix Printer was a parallel predecessor to the Imagewriter
  329. printer.  As far as I know, the Imagewriter commands are a superset
  330. to those of the Dot Matrix printer, so the driver should work fine at
  331. generating output that can be printed on Imagewriters.
  332.  
  333.  A few notes (from the gdevadmp.c file):
  334.  
  335.  * To print out images, it sets the printer for unidirection printing
  336.  * and 15 cpi (120 dpi). IT sets line feed to 1/9 of an inch (72 dpi).
  337.  * When finished, it sets things back to bidirection print, 1/8" line
  338.  * feeds, and 12 cpi.  There does not appear to be a way to reset
  339.  * things to initial values.
  340.  *
  341.  * This code does not set for 8 bit characters (which is required). It
  342.  * also assumes that carriage return/newline is needed, and not just
  343.  * carriage return.  These are all switch settings on the DMP, and
  344.  * I have configured them for 8 bit data and cr only.
  345.  *
  346.  * You can search for the strings Init and Reset (in devdemp.c) to find the
  347.  * strings that set up the printer and clear things when finished, and change
  348.  * them to meet your needs.
  349.  *
  350.  * Also, you need to make sure that the printer daemon (assuming unix)
  351.  * doesn't change the data as it is being printed.  I have set my
  352.  * printcap file (sunos 4.1.1) with the string:
  353.  * ms=pass8,-opost
  354.  * and it works fine.
  355.  
  356.  Mark Wedel
  357. master@cats.ucsc.edu
  358.  
  359. ### ------------------------------ End --------------------------------- ###
  360.