1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html> 3<head> 4<title>Deprecated Ghostscript features</title> 5<!-- $Id: Deprecated.htm,v 1.20 2005/10/20 19:46:23 ray Exp $ --> 6<link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style"> 7</head> 8 9<body> 10<!-- [1.0 begin visible header] ============================================ --> 11 12<!-- [1.1 begin headline] ================================================== --> 13 14<h1>Deprecated Ghostscript options and output devices</h1> 15 16<!-- [1.1 end headline] ==================================================== --> 17 18<!-- [1.2 begin table of contents] ========================================= --> 19 20<h2>Table of contents</h2> 21 22<blockquote><ul> 23<li><a href="#Options">Deprecated Options</a> 24<li><a href="#HP8_color_inkjet">H-P 8xx, 1100, and 1600 color inkjet printers</a> 25<ul> 26<li><a href="#HP8_gdevcd8">Drivers contained in <b><tt>gdevcd8.c</tt></b></a> 27<li><a href="#HP8_further_documentation">Further documentation</a> 28</ul> 29<li><a href="#HP880_color_inkjet">H-P 812, 815, 832, 880, 882, 895, and 970 color inkjet printers</a> 30<ul> 31<li><a href="#HP880_gdevcd8">Drivers contained in <b><tt>gdevcd8.c</tt></b></a> 32<li><a href="#HP880_further_documentation">Further documentation</a> 33</ul> 34<li><a href="#HP_color_inkjet">Other H-P color inkjet printers</a> 35<ul> 36<li><a href="#HP_gdevcdj">Drivers contained in <b><tt>gdevcdj.c</tt></b></a> 37<li><a href="#HP_paper_size">Default paper size</a> 38<li><a href="#HP_limits">Deskjet physical limits</a> 39<li><a href="#HP_command_line">Printer properties (command-line parameters)</a> 40<ul> 41<li><a href="#HP_bpp">Bits per pixel</a> 42<li><a href="#HP_deskjet_properties">Deskjet properties</a> 43<li><a href="#HP_paintjet_properties">Paintjet XL300 / Paintjet XL properties</a> 44</ul> 45<li><a href="#HP_gamma">Gamma correction</a> 46<li><a href="#HP_resolution_enhance">HP's resolution-enhanced mode for Inkjet printers</a> 47<li><a href="#HP_tips">General tips</a> 48</ul> 49<li><a href="#BJC_8200">Canon BJC-8200 printer</a> 50<li><a href="#BJC">Other Canon BubbleJet (BJC) printers</a> 51<ul> 52<li><a href="#BJC_history">History</a> 53<li><a href="#BJC_build">Configuring and building the BJC drivers</a> 54<ul> 55<li><a href="#BJC_defaults">Modify values in <b><tt>gdevbjc.h</tt></b></a> 56<li><a href="#BJC_CMYK_RGB">CMYK-to-RGB color conversion</a> 57<li><a href="#BJC_vertical_centering">Vertical centering of the printable area</a> 58<li><a href="#BJC_margins">Page margins</a> 59<li><a href="#BJC_compile">Makefile and compilation</a> 60</ul> 61<li><a href="#BJC_usage">Use of the drivers</a> 62<ul> 63<li><a href="#BJC_options">Supported Options and Defaults</a> 64<li><a href="#BJC_device_info">Device information</a> 65<li><a href="#BJC_HW_margins">Hardware margins</a> 66<li><a href="#BJC_PPD">PostScript printer description (PPD) files</a> 67<li><a href="#BJC_PPD_custom">Customizing the PPD files</a> 68</ul> 69<li><a href="#BJC_bugs">How to report problems</a> 70<li><a href="#BJC_acks">Acknowledgements</a> 71</ul> 72<li><a href="#STC_epson_stylus">Epson Stylus color printer (see also <b><tt>uniprint</tt></b>)</a> 73<ul> 74<li><a href="#STC_usage">Usage</a> 75<li><a href="#STC_options">Options</a> 76<li><a href="#STC_FAQ">Application note and FAQ</a> 77<ul> 78<li><a href="#STC_FAQ_A3">Support for A3 paper</a> 79<li><a href="#STC_FAQ_margins">Margins, PageSize</a> 80<li><a href="#STC_FAQ_II_IIS_1500">Stylus Color II / IIs and 1500</a> 81</ul> 82<li><a href="#STC_recommendations">Recommendations</a> 83<ul> 84<li><a href="#STC_dither_experiment">Color dithering experiments with <b><tt>gdevstc</tt></b> 1.21</a> 85</ul> 86<li><a href="#STC_color_transform">Color transformation</a> 87<li><a href="#STC_CAM"><b><tt>ColorAdjustMatrix</tt></b></a> 88<li><a href="#STC_RGBCMYK_coding">RGB / CMYK coding and transfer, and <b><tt>BitsPerPixel</tt></b></a> 89<li><a href="#What_is_weaving">What is weaving?</a> 90<li><a href="#STC_print_modes">Print mode parameters</a> 91<ul> 92<li><a href="#STC_unidirectional"><b><tt>Unidirectional</tt></b></a> 93<li><a href="#STC_noweave"><b><tt>Microweave</tt></b>, <b><tt>noWeave</tt></b> and <b><tt>OutputCode=deltarow</tt></b></a> 94<li><a href="#STC_model"><b><tt>Model</tt></b></a> 95</ul> 96<li><a href="#STC_Pitfalls">Bugs and pitfalls</a> 97<li><a href="#STC_Tests">Tests</a> 98<ul> 99<li><a href="#STC_OutputCodes">The various OutputCodes</a> 100<li><a href="#STC_printing_time">Printing time related to other options</a> 101</ul> 102<li><a href="#STC_acks">Acknowledgments</a> 103</ul> 104<li><a href="#Uniprint">uniprint, a flexible unified printer driver</a> 105<ul> 106<li><a href="#Uni_state">The state of this driver</a> 107<li><a href="#Uni_background">Notes on <b><tt>uniprint</tt></b>'s background</a> 108<li><a href="#Uni_make_pfile">Godzilla's guide to the creation of Unified Printer Parameter (<b><tt>.upp</tt></b>) files</a> 109<li><a href="#Uni_all_parameters">All parameters in brief</a> 110<li><a href="#Uni_honors"><b><tt>Uniprint</tt></b>'s Roll of Honor</a> 111<li><a href="#Uni_weaving_howto"><b><tt>Uniprint</tt></b> weaving parameters howto</a></li> 112<li><a href="#Uni_esc300">Extension to <b><tt>uniprint</tt></b> for the Epson Stylus Color 300</a></li> 113</ul> 114</ul></blockquote> 115 116<!-- [1.2 end table of contents] =========================================== --> 117 118<!-- [1.3 begin hint] ====================================================== --> 119 120<p><strong>These devices are no longer supported and/or superceeded by newer methods. 121The documentation is kept here for reference. Be advised that these devices 122will be removed in future versions of Ghostscript.</strong></p> 123 124<p>Supported devices are descripted in <a href="Devices">Details of Ghostscript 125output devices</a>.</p> 126 127<p>For other information, see the <a href="Readme.htm">Ghostscript 128overview</a>. You may also be interested in <a href="Make.htm">how to 129build Ghostscript</a> and <a href="Install.htm">install it</a>, as well as 130the description of the <a href="Drivers.htm">driver interface</a>. 131 132<!-- [1.3 end hint] ======================================================== --> 133 134<hr> 135 136<!-- [1.0 end visible header] ============================================== --> 137 138<!-- [2.0 begin contents] ================================================== --> 139 140<h2><a name="Options"></a>Deprecated options</h2> 141 142<p> 143For compatibility with older versions of Ghostscript, <tt>-sOUTPUTFILE</tt> 144is a synonym for <tt>-sOutputFile</tt>. It should not be used in new code. 145 146<hr> 147 148<h2><a name="HP8_color_inkjet"></a>H-P 8xx, 1100, and 1600 color inkjet printers</h2> 149 150<p> 151This section, written by Uli Wortmann <<a 152href="mailto:uliw@erdw.ethz.ch">uliw@erdw.ethz.ch</a>>, deals with the 153DeskJet 670, 690, 850, 855, 870, 890, 1100, and 1600. 154 155<h3><a name="HP8_gdevcd8"></a>Drivers contained in <b><tt>gdevcd8.c</tt></b></h3> 156 157<p> 158The source module <b><tt>gdevcd8.c</tt></b> contains four generic drivers: 159 160<blockquote><table cellpadding=0 cellspacing=0> 161<tr valign=top> <td><b><tt>cdj670</tt></b> 162 <td> 163 <td>HP DeskJet 670 and 690 164<tr valign=top> <td><b><tt>cdj850</tt></b> 165 <td> 166 <td>HP DeskJet 850, 855, 870, and 1100 167<tr valign=top> <td><b><tt>cdj890</tt></b> 168 <td> 169 <td>HP DeskJet 890 170<tr valign=top> <td><b><tt>cdj1600</tt></b> 171 <td> 172 <td>HP DeskJet 1600 173</table></blockquote> 174 175<h3><a name="HP8_further_documentation"></a>Further documentation</h3> 176 177<p> 178<b>Credits:</b> Much of the driver is based on ideas derived from the 179cdj550 driver of George Cameron. The support for the hp670, hp690, hp890 180and hp1600 was added by Martin Gerbershagen. 181 182<blockquote><table cellpadding=0 cellspacing=0> 183<tr valign=top> <td>11.11.96 184 <td> 185 <td>Version 1.0 186 <td> 187 <td> 188<tr valign=top> <td>25.08.97 189 <td> 190 <td>Version 1.2 191 <td> 192 <td>Resolved all but one of the known bugs, introduced a couple of 193 perfomance improvements. Complete new color-transfer-function 194 handling (see gamma). 195<tr valign=top> <td>01.06.98 196 <td> 197 <td>Version 1.3 198 <td> 199 <td>Due to the most welcome contribution of Martin Gerbershagen 200 (ger@ulm.temic.de), support for the hp670, hp690 and hp890 and 201 hp1600 has been added. Martin has also resolved all known bugs. 202<tr valign=top> <td> 203 <td> 204 <td> 205 <td> 206 <td>Problems:Dark colors are still pale. 207</table></blockquote> 208 209<p> 210The hp690 is supported through the hp670 device, the hp855, hp870 and the 211hp1100 through the hp850 device. The driver needs no longer special 212switches to be invoked except <b><tt>-sDEVICE=cdj850</tt></b>, 213<b><tt>-sDEVICE=CDJ890</tt></b>, <b><tt>-sDEVICE=CDJ670</tt></b>, or 214<b><tt>-sDevice=CDJ1600</tt></b>. The following switches are supported. 215 216<blockquote><table cellpadding=0 cellspacing=0> 217<tr valign=top> <td><b><tt>-dPapertype=</tt></b> 218 <td> 219 <td>0 220 <td> 221 <td>plain paper [default] 222<tr valign=top> <td> 223 <td> 224 <td>1 225 <td> 226 <td>bond paper 227<tr valign=top> <td> 228 <td> 229 <td>2 230 <td> 231 <td>special paper 232<tr valign=top> <td> 233 <td> 234 <td>3 235 <td> 236 <td>glossy film 237<tr valign=top> <td> 238 <td> 239 <td>4 240 <td> 241 <td>transparency film 242<tr valign=top> <td> 243 <td> 244 <td> 245 <td> 246 <td>Currently the lookup tables are unsuited for printing on 247 special paper or transparencies. For these please revert to the 248 gamma functions. 249<tr valign=top> <td><b><tt>-dQuality=</tt></b> 250 <td> 251 <td>-1 252 <td> 253 <td>draft 254<tr valign=top> <td> 255 <td> 256 <td>0 257 <td> 258 <td>normal [default] 259<tr valign=top> <td> 260 <td> 261 <td>1 262 <td> 263 <td>presentation 264<tr valign=top> <td><b><tt>-dRetStatus=</tt></b> 265 <td> 266 <td>0 267 <td> 268 <td>C-RET off 269<tr valign=top> <td> 270 <td> 271 <td>1 272 <td> 273 <td>C-RET on [default] 274<tr valign=top> <td><b><tt>-dMasterGamma=</tt></b> 275 <td> 276 <td>3.0 277 <td> 278 <td>[default = 1.0] 279</table></blockquote> 280 281<blockquote> 282<b>Note:</b> To take advantage of the calibrated color-transfer functions, 283be sure not to have any gamma statements left! If you need to (i.e., for 284overhead transparencies), you still can use the gamma functions, but they 285will override the built-in calibration. To use gamma in the traditional 286way, set MasterGamma to any value greater than 1.0 and less than 10.0. To 287adjust individual gamma values, you have to additionally set MasterGamma to 288a value greater than 1.0 and less than 10.0. With the next release, gamma 289functions will be dropped. 290</blockquote> 291 292<p> 293When using the driver, be aware that printing at 600dpi involves 294processing large amounts of data (> 188MB !). Therefore the 295driver is not what you would expect to be a fast driver ;-) 296This is no problem when printing a full-sized color page (because 297printing itself is slow), but it's really annoying if you print only 298text pages. Maybe I can optimize the code for text-only pages in a 299later release. Right now, it is recommended to use the highest 300possible optimisation level your compiler offers. 301For the time being, use the cdj550 device with <b><tt>-sBitsPerPixel=3</tt></b> 302for fast proof prints. If you simply want to print 600dpi BW data, 303use the cdj550 device with <b><tt>-sBitsPerPixel=8</tt></b> (or 1). 304 305<p> 306Since the printer itself is slow, it may help to set the process priority 307of the gs process to "regular" or even less. On a 486/100MHz this is still 308sufficient to maintain a continuous data flow. Note to OS/2 users: simply 309put the gs window into the background or minimize it. Also make sure that 310<b><tt>print01.sys</tt></b> is invoked without the <b><tt>/irq</tt></b> 311switch (great speed improvement under Warp4). 312 313<p> 314The printer default settings compensate for dot-gain by a calibrated 315color-transfer function. If this appears to be too light for your business 316graphs, or for overhead transparencies, feel free to set 317<b><tt>-dMasterGamma=1.7</tt></b>. Furthermore, you may tweak the gamma 318values independently by setting <b><tt>-dGammaValC</tt></b>, 319<b><tt>-dGammaValM</tt></b>, <b><tt>-dGammaValY</tt></b> or 320<b><tt>-dGammaValK</tt></b> (if not set, the values default to 321<b><tt>MasterGamma</tt></b>). This will only work when 322<b><tt>-dMasterGamma</tt></b> is set to a value greater than 1.0. 323 324<p> 325Further information, bugs, tips etc, can be found at my website. To learn 326more about gamma, see 327<a href="ftp://ftp.igd.fhg.de/pub/doc/colour/GammaFAQ.pdf">ftp://ftp.igd.fhg.de/pub/doc/colour/GammaFAQ.pdf</a>. 328 329<p> 330Depending on how you transfer the files, under UNIX you may need to remove 331the CRs of the CR-LF sequence used for end-of-line on DOS-based (MS 332Windows-based) systems. You can do this in unpacking the files with <b><tt>unzip -a hp850.zip</tt></b>. 333 334<p> 335To compile with gs5.x or later, simply add to your makefile 336<blockquote> 337DEVICE_DEVS4=cdj850.dev cdj670.dev cdj890.dev cdj1600.dev 338</blockquote> 339 340<p> 341Have fun! 342 343<p> 344Uli <<a href="mailto:uliw@erdw.ethz.ch">uliw@erdw.ethz.ch</a>> 345<br><a href="http://www.erdw.ethz.ch/~bonk/">http://www.erdw.ethz.ch/~bonk/</a> 346 347<hr> 348 349<h2><a name="HP880_color_inkjet"></a>H-P 812, 815, 832, 880, 882, 895, and 970 color inkjet printers</h2> 350 351<p> 352This section, written by Matthew Gelhaus <<a 353href="mailto:hp880@gelhaus.net">hp880@gelhaus.net</a>>, deals with the 354DeskJet 812, 815, 832, 880, 882, 895, and 970. 355 356<p> 357This is a modified version of the <a href="#HP8_color_inkjet">HP8xx driver</a> 358written by Uli Wortmann. More information and download are available at 359<a href="http://www.gelhaus.net/hp880c/">http://www.gelhaus.net/hp880c/</a>. 360 361<h3><a name="HP880_gdevcd8"></a>Drivers contained in <b><tt>gdevcd8.c</tt></b></h3> 362 363<p> 364The source module <b><tt>gdevcd8.c</tt></b> contains one generic driver: 365 366<blockquote><table cellpadding=0 cellspacing=0> 367<tr valign=top> <td><b><tt>cdj880</tt></b> 368 <td> 369 <td>HP DeskJet 812, 815, 832, 880, 882, 895, and 970 370</table></blockquote> 371 372<h3><a name="HP880_further_documentation"></a>Further documentation</h3> 373 374<p> 375<b>Credits:</b> This driver is based on the cdj850 driver by Uli Wortmann, and shares the same 376internal structure, although the PCL3+ interpretation has changed. 377 378<blockquote><table cellpadding=0 cellspacing=0> 379<tr valign=top> <td>15.03.99 380 <td> 381 <td>Version 1.3 382 <td> 383 <td>Initial version, based on Version 1.3 of Uli Wortmann's driver. 384<tr valign=top> <td>26.02.00 385 <td> 386 <td>Version 1.4beta 387 <td> 388 <td>Greatly improved color handling & dithering, but not yet complete enough 389 to use for text. 390</table></blockquote> 391 392<p> 393All printers are supported through the cdj880 device. Invoke with 394<b><tt>-sDEVICE=cdj880</tt></b>. The following switches are supported. 395 396<blockquote><table cellpadding=0 cellspacing=0> 397<tr valign=top> <td><b><tt>-dPapertype=</tt></b> 398 <td> 399 <td>0 400 <td> 401 <td>plain paper [default] 402<tr valign=top> <td> 403 <td> 404 <td>1 405 <td> 406 <td>bond paper 407<tr valign=top> <td> 408 <td> 409 <td>2 410 <td> 411 <td>special paper 412<tr valign=top> <td> 413 <td> 414 <td>3 415 <td> 416 <td>glossy film 417<tr valign=top> <td> 418 <td> 419 <td>4 420 <td> 421 <td>transparency film 422<tr valign=top> <td> 423 <td> 424 <td> 425 <td> 426 <td>Currently the lookup tables are unsuited for printing on 427 special paper or transparencies. For these please revert to the 428 gamma functions. 429<tr valign=top> <td><b><tt>-dQuality=</tt></b> 430 <td> 431 <td>-1 432 <td> 433 <td>draft 434<tr valign=top> <td> 435 <td> 436 <td>0 437 <td> 438 <td>normal [default] 439<tr valign=top> <td> 440 <td> 441 <td>1 442 <td> 443 <td>presentation 444<tr valign=top> <td><b><tt>-dMasterGamma=</tt></b> 445 <td> 446 <td>3.0 447 <td> 448 <td>[default = 1.0] 449</table></blockquote> 450 451<p> 452The printer default settings compensate for dot-gain by a pre-defined 453color-transfer function. If this appears to be too light for your business 454graphs, or for overhead transparencies, feel free to set 455<b><tt>-dMasterGamma=1.7</tt></b>. Furthermore, you may tweak the gamma 456values independently by setting <b><tt>-dGammaValC</tt></b>, 457<b><tt>-dGammaValM</tt></b>, <b><tt>-dGammaValY</tt></b> or 458<b><tt>-dGammaValK</tt></b> (if not set, the values default to 459<b><tt>MasterGamma</tt></b>). This will only work when 460<b><tt>-dMasterGamma</tt></b> is set to a value greater than 1.0. 461 462<p> 463Further information, bugs, tips etc, can be found at my website. 464 465<p> 466To compile with gs6.x or later, simply add to your makefile 467<blockquote> 468DEVICE_DEVS4=$(DD)cdj880.dev 469</blockquote> 470 471<p> 472Matthew Gelhaus <<a href="mailto:hp880@gelhaus.net">mailto:hp880@gelhaus.net</a>> 473<br><a href="http://www.gelhaus.net/hp880c/">http://www.gelhaus.net/hp880c/</a> 474 475<hr> 476 477<h2><a name="HP_color_inkjet"></a>H-P color inkjet printers</h2> 478 479<p> 480This section, written by George Cameron, deals with the DeskJet 500C, 481DeskJet 550C, PaintJet, PaintJet XL, PaintJet XL300, the DEC LJ250 482operating in PaintJet-compatible mode. 483 484<h3><a name="HP_gdevcdj"></a>Drivers contained in <b><tt>gdevcdj.c</tt></b></h3> 485 486<p> 487The source module <b><tt>gdevcdj.c</tt></b> contains six generic drivers: 488 489<blockquote><table cellpadding=0 cellspacing=0> 490<tr valign=top> <td><b><tt>cdj500</tt></b> 491 <td> 492 <td>HP DeskJet 500C and 540C 493<tr valign=top> <td><b><tt>cdj550</tt></b> 494 <td> 495 <td>HP DeskJet 550C, 560C, 660C, 660Cse 496<tr valign=top> <td><b><tt>pjxl300</tt></b> 497 <td> 498 <td>HP PaintJet XL300, DeskJet 1200C, and CopyJet 499<tr valign=top> <td><b><tt>pjtest</tt></b> 500 <td> 501 <td>HP PaintJet 502<tr valign=top> <td><b><tt>pjxltest</tt></b> 503 <td> 504 <td>HP PaintJet XL 505<tr valign=top> <td><b><tt>declj250</tt></b> 506 <td> 507 <td>DEC LJ250 508</table></blockquote> 509 510<p> 511All these drivers have 8-bit (monochrome), 16-bit and 24-bit (colour) and 512for the DJ 550C, 32-bit (colour, CMYK mode) options in addition to standard 513colour and mono drivers. It is also possible to set various 514printer-specific parameters from the command line, for example 515 516<blockquote><b><tt> 517gs -sDEVICE=cDeskJet -dBitsPerPixel=16 -dDepletion=1 -dShingling=2 tiger.eps 518</tt></b></blockquote> 519 520<p> 521<b>Note:</b> the old names <b><tt>cDeskJet</tt></b>, 522<b><tt>cdjcolor</tt></b> and <b><tt>cdjmono</tt></b> drivers have been 523retained; however, their functionality duplicates that available using the 524drivers above (and <b><tt>cDeskJet</tt></b> is identical to 525<b><tt>cdj500</tt></b>). That is, we can use 526 527<blockquote><table cellpadding=0 cellspacing=0> 528<tr valign=top> <td><b><tt>gs -sDEVICE=cdj500 -dBitsPerPixel=24</tt></b> 529 <td> 530 <td>for <b><tt>cdjcolor</tt></b>, and 531<tr valign=top> <td><b><tt>gs -sDEVICE=cdj500 -dBitsPerPixel=1</tt></b> 532 <td> 533 <td>for <b><tt>cdjmono</tt></b> 534</table></blockquote> 535 536<h3><a name="HP_paper_size"></a>Default paper size</h3> 537 538<p> 539If the preprocessor symbol <b><tt>A4</tt></b> is defined, the default paper 540size is ISO A4; otherwise it is U.S. letter size (see about 541<a href="Use.htm#Known_paper_sizes">paper sizes</a> in the usage 542documentation). You can <a href="Use.htm#Paper_size">specify other paper 543sizes</a> on the command line, including A3 for the PaintJet XL and 544PaintJet XL300, as also explained in the usage documentation. 545 546<h3><a name="HP_limits"></a>DeskJet physical limits</h3> 547 548<p> 549The DeskJet's maximum printing width is 2400 dots, or 8 inches 550(20.32cm). The printer manuals say that the maximum recommended printing 551height on the page is 10.3 inches (26.16cm), but since this is obviously 552not true for A4 paper, and I have been unable to detect any problems in 553printing longer page lengths, this would seem to be a rather artificial 554restriction. 555 556<p> 557All DeskJets have 0.5 inches (1.27cm) of unprintable bottom margin, due to the mechanical 558arrangement used to grab the paper. Side margins are approximately 0.25 inches (0.64cm) 559for U.S. letter paper, and 0.15 inches (0.38cm) for A4. 560 561<h4><a name="HP_command_line"></a>Printer properties (command-line parameters)</h4> 562 563<p> 564Several printer "properties" have been implemented for these printers. 565Those available so far are all integer quantities, and thus may be 566specified, for instance, like 567 568<blockquote> 569<b><tt>gs -dBitsPerPixel=32 -dShingling=1</tt></b> ... 570</blockquote> 571 572<p> 573which sets the <b><tt>BitsPerPixel</tt></b> parameter to 32 and the 574<b><tt>Shingling</tt></b> parameter to 1. 575 576<h4><a name="HP_bpp"></a>Bits per pixel</h4> 577 578<p> 579If the preprocessor symbol <b><tt>BITSPERPIXEL</tt></b> is defined as an 580integer (see below for the range of allowable values), that number defines 581the default bits per pixel (bit depth) for the generic drivers. If the 582symbol is undefined, the default is 24 bits per pixel. It is, of course, 583still possible to specify the value from the command line as described 584below. Note also that the <b><tt>cDeskJet</tt></b>, 585<b><tt>cdjcolor</tt></b> and <b><tt>cdjmono</tt></b> drivers are unaffected 586by setting this symbol, as their default settings are predefined to be 1, 3 587and 24 respectively. 588 589<p> 590All of the drivers in <b><tt>gdevcdj.c</tt></b> accept a command line 591option to set the <b><tt>BitsPerPixel</tt></b> property. This gives 592considerable flexibility in choosing various tradeoffs among speed, 593quality, colour, etc. The valid numbers are: 594 595<blockquote><dl compact> 596<dt><b>1</b> 597<dd>A standard Ghostscript monochrome driver, using black ink (by 598installing the separate mono cartridge in the case of the DeskJet 500C, or 599automatically for the other printers). 600 601<dt><b>3</b> 602<dd>A standard Ghostscript colour driver, using internal dithering. This 603is fast to compute and to print, but the clustered dithering can lose some 604detail and colour fidelity. 605 606<dt><b>8</b> 607<dd>An "error-diffusion" monochrome driver which uses Floyd-Steinberg 608dithering to print greyscale images. The patterns are much more randomised 609than with the normal clustered dithering, but the data files can be much 610larger and somewhat slower to print. 611 612<dt><b>16</b> 613<dd>A "cheaper" version of the 24-bit driver, which generates 614Floyd-Steinberg colour dithered output using the minimum memory (this may 615be helpful when using Ghostscript has not been compiled using a 16-bit 616build environment). The quality can be almost as good as the 24-bit 617version. 618 619<dt><b>24</b> 620<dd>A high-quality colour driver using Floyd-Steinberg dithering for 621maximum detail and colour range. However, it is very memory-intensive, and 622thus can be slow to compute. It tends to produce rather larger raw data 623files, so they can also take longer to print. 624 625<dt><b>32</b> 626<dd>Only for the DeskJet 550C, which uses the black cartridge and the 627colour cartridge simultaneously (that is, CMYK printing). This printer can 628both be faster and give higher quality than the DeskJet 500C, because of 629the true black ink. (Note that the 24-bit mode also permits CMYK printing 630on this printer, and uses less memory. Any differences between 24-bit and 63132-bit should be small.) 632</dl></blockquote> 633 634<h4><a name="HP_DeskJet_properties"></a>DeskJet properties</h4> 635 636<blockquote><table cellpadding=0 cellspacing=0> 637<tr valign=bottom> 638 <th align=left>Name 639 <td> 640 <th align=left>Type 641 <td> 642 <th align=left> 643<tr> <td colspan=5><hr> 644<tr valign=top> <td><b><tt>BlackCorrect</tt></b> 645 <td> 646 <td><b><tt>int</tt></b> 647 <td> 648 <td>Colour correction to give better blacks when using the DJ500C in colour mode. For example, the default of 4 reduces the cyan component to 4/5. Range accepted: 0 - 9 (0 = none). 649<tr valign=top> <td><b><tt>Shingling</tt></b> 650 <td> 651 <td><b><tt>int</tt></b> 652 <td> 653 <td>Interlaced, multi-pass printing: 0 = none, 1 = 50%, 2 = 25%, 2 is best and slowest. 654<tr valign=top> <td><b><tt>Depletion</tt></b> 655 <td> 656 <td><b><tt>int</tt></b> 657 <td> 658 <td>"Intelligent" dot-removal: 0 = none, 1 = 25%, 2 = 50%, 1 best for graphics? Use 0 for transparencies. 659</table></blockquote> 660 661<h4><a name="HP_PaintJet_properties"></a>PaintJet XL300 / PaintJet XL properties</h4> 662 663<blockquote> 664<table cellpadding=0 cellspacing=0> 665<tr valign=bottom> 666 <th align=left>Name 667 <td> 668 <th align=left>Type 669 <td> 670 <th align=left> 671<tr> <td colspan=5><hr> 672<tr valign=top> <td><b><tt>PrintQuality</tt></b> 673 <td> 674 <td><b><tt>int</tt></b> 675 <td> 676 <td>Mechanical print quality: -1 = fast, 0 = normal, 1 = presentation. Fast mode reduces ink usage and uses single-pass operation for some media types. Presentation uses more ink and the maximum number of passes, giving slowest printing for highest quality 677<tr valign=top> <td><b><tt>RenderType</tt></b> 678 <td> 679 <td><b><tt>int</tt></b> 680 <td> 681 <td><dl compact> 682 <dt><b>0</b><dd>driver does dithering 683 <dt><b>1</b><dd>snap to primaries 684 <dt><b>2</b><dd>snap black to white, others to black 685 <dt><b>3</b><dd>ordered dither 686 <dt><b>4</b><dd>error diffusion 687 <dt><b>5</b><dd>monochrome ordered dither 688 <dt><b>6</b><dd>monochrome error diffusion 689 <dt><b>7</b><dd>cluster ordered dither 690 <dt><b>8</b><dd>monochrome cluster ordered dither 691 <dt><b>9</b><dd>user-defined dither (not supported) 692 <dt><b>10</b><dd>monochrome user-defined dither ns. 693 </dl> 694</table> 695 696<p> 697The PaintJet (non-XL) has no additional properties. 698 699</blockquote> 700 701<h3><a name="HP_gamma"></a>Gamma correction</h3> 702 703<p> 704One consequence of using Floyd-Steinberg dithering rather than Ghostscript's 705default clustered ordered dither is that it is much more obvious that the 706ink dots are rather larger on the page than their nominal 1/180-inch or 1/300-inch 707size (clustering the dots tends to minimise this effect). Thus it is often 708the case that the printed result is rather too dark. A simple empirical 709correction for this may be achieved by preceding the actual PostScript 710file to be printed by a short file which effectively sets the gamma for 711the device, such as 712 713<blockquote><b><tt> 714gs ... gamma.ps colorpic.ps -c quit 715</tt></b></blockquote> 716 717<p> 718where <b><tt>gamma.ps</tt></b> is 719 720<blockquote> 721<pre>%! 722/.fixtransfer { 723 currentcolortransfer 4 { 724 mark exch 725 dup type dup /arraytype eq exch /packedarraytype eq or 726 1 index xcheck and { /exec load } if 727 0.333 /exp load 728 ] cvx 4 1 roll 729 } repeat setcolortransfer 730} bind odef 731.fixtransfer 732/setpagedevice { setpagedevice .fixtransfer } bind odef</pre> 733</blockquote> 734 735<p> 736This does the gamma correction <b><em>after</em></b> whatever correction 737the device might be doing already. To do the correction 738<b><em>before</em></b> the current correction, 739 740<blockquote> 741<pre>%! 742/.fixtransfer { 743 currentcolortransfer 4 { 744 mark 0.333 /exp load 4 -1 roll 745 dup type dup /arraytype eq exch /packedarraytype eq or 746 1 index xcheck and { /exec load } if 747 ] cvx 4 1 roll 748 } repeat setcolortransfer 749} bind odef 750.fixtransfer 751/setpagedevice { setpagedevice .fixtransfer } bind odef</pre> 752</blockquote> 753 754<p> 755This example sets the gamma for R, G, and B to 3, which seems to work 756reasonably well in practice. 757 758<h3><a name="HP_resolution_enhance"></a>HP's resolution-enhanced mode for Inkjet printers</h3> 759 760<p> 761This feature is available on HP's more recent inkjet printers, including 762the DeskJet 520 (mono), 540 (mono or colour) and 560C (mono and colour). 763The colour and monochrome drivers for the HP DeskJet 550c are (probably) 764the best you will get for use with Ghostscript, for the following reasons. 765 766<p> 767These printers do not offer true 600×300dpi resolution. Those that 768print in colour are strictly 300×300dpi in colour mode, while in mono 769mode there is a pseudo 600×300dpi mode with the restriction that you 770can't print two adjacent dots. In effect what you have is 600dpi dot 771positioning, but on average you don't get more dots per line. This 772provides the possibility, for instance, to have sharper character outlines, 773because you can place dots on the edges nearer to their ideal positions. 774This is why it is worth doing. 775 776<p> 777However, HP will not support user-level programming of this 778resolution-enhanced mode, one reason being that (I understand) all the dot 779spacing has to be done by the driver, and if you get it wrong, you can 780actually damage the print head. 781 782<p> 783To summarise, you may lose a smidgin of (potential) text clarity using the 784550c drivers (<b><tt>cdj550</tt></b>, <b><tt>cdjcolor</tt></b>, 785<b><tt>cdjmono</tt></b> etc.), but other than that, they are the ones for 786the job. 787 788<h3><a name="HP_tips"></a>General tips</h3> 789 790<p> 791For all the printers above, the choice of paper is critically important to 792the final results. The printer manuals suggest type of paper, but in 793general, smoother, less fibrous types give better results. In particular, 794the special ink-jet paper can make a big difference: colours are brighter, 795but most importantly, there is almost no colour bleed, even with adjacent 796areas of very heavy inking. Similarly the special coated transparencies 797also work well (and ordinary transparencies do not work at all!). 798 799<p> 800The Unix procedure <a href="Unix-lpr.htm"><b><tt>unix-lpr.sh</tt></b></a> 801provides one example of setting up a multi-option colour PostScript 802<b><tt>lpr</tt></b> queue on Unix systems, and includes the ability to 803choose a range of different colour options and printer accounting and error 804logging. 805 806<p> 807<b>Caveat emptor!</b> It is not always easy for me to test all of these 808drivers, as the only colour printer I have here is the DeskJet 500C. I rely 809on others to test drivers for the additional machines and report their 810findings back to me. 811 812<hr> 813 814<h2><a name="BJC_8200"></a>Canon BJC-8200 printer</h2> 815 816<p> 817This section was contributed by the author of the <b><tt>uniprint</tt></b> 818configuration files for the Canon BJC-8200, Stephan C. Buchert <<a 819href="mailto:scb@stelab.nagoya-u.ac.jp">scb@stelab.nagoya-u.ac.jp</a>>. 820These files also handle the Japanese Canon F850 printer. 821 822<p> 823Warning: Usage of this program is neither supported nor endorsed by 824the Canon corporation. Please see the Ghostscript <a 825href="Public.htm">license</a> regarding warranty. 826 827<h3>Introduction</h3> 828 829<p> 830The Canon Bubble Jet printer BJC-8200 is designed for printing digital 831photos and halftone images. Software drivers for Windows 95-2000 and Mac are 832usually included and can be downloaded from the Canon web sites like 833<a href="http://consumer.usa.canon.com/bjc/bjc8200/">http://consumer.usa.canon.com/bjc/bjc8200/</a> 834for the US market. If these drivers cannot be used for some reason, then at 835present Ghostscript is probably the alternative giving the best results. 836 837<p> 838The BJC-8200 has features not found among the specs of earlier bubble jet 839models (except the even more advanced BJC-8500) and is advertised to offer: 840 841<ol> 842 843<li>microfine droplet technology; 844 845<li>support for printing on a new type of paper, Photo Paper Pro; 846 847<li>a printhead capable of printing up to 1200 DpI; 848 849<li>individual ink tanks for 6 colors; 850 851<li>an internal status monitor reporting low ink back to a driver; 852 853<li>an optional color scanner cartridge for up to 600 DpI resolution. 854 855</ol> 856 857<p> 858Access to features 5 and 6 requires use of the original Canon drivers for 859the foreseeable future. This README is about getting the printer features 8601-3 working with Ghostscript. No (re)compilation of Ghostscript is normally 861required. 862 863<p> 864Ghostscript comes with a relatively highly configurable driver, called 865<a href="#Uniprint">uniprint</a>, for printers which understand raster 866images in various propriety formats. Most options for this driver are 867usually organized into files having the suffix ".upp." Ghostscript 868versions >= 5.10 (or even earlier) include such uniprint control files 869for the Canon BJC-610. They work also well for some other Canon Bubble 870Jet models, for example for my BJC-35vII. But when using them for a 871BJC-8200 the result is unsatisfactory. 872 873<h3>The uniprint control files for the BJC-8200</h3> 874 875<p> 876After some experimenting with the options for uniprint I have obtained quite 877satisfactory prints with my printer(*). This distribution includes six new 878uniprint control files: 879 880<ul> 881<li>bj8pp12f.upp 882<li>bj8hg12f.upp 883<li>bj8gc12f.upp 884<li>bj8oh06n.upp 885<li>bj8ts06n.upp 886<li>bj8pa06n.upp 887</ul> 888 889<p> 890They are included in Ghostscript >=6.21. For older versions you can put 891them anywhere in the Ghostscript search path (type "gs -h" to see the 892path), but should perhaps add the files to the directory with the 893other *.upp files. This is "/usr/share/ghostscript/gs6.01/lib" in my 894RedHat 6.1 Linux box with Aladdin Ghostscript 6.01. 895 896<p> 897Here is an explanation of my file name convention: the prefix "bj8" should 898perhaps be used for the Canon BJC-8200 and compatible (like the Japanese 899F850 and perhaps the non-Japanese BJC-8500) models. The next two letters 900indicate the print media: 901 902<ul> 903<li>pp "Photo Paper Pro" 904<li>hg "High Gloss Photo Film" 905<li>gc "Glossy Photo Cards" 906<li>oh "OHP transparencies" 907<li>ts "T-shirt transfer" 908<li>pa "Plain Paper" 909</ul> 910 911<p> 912The numbers at positions 6 and 7 indicate the resolution 913 914<ul> 915<li>12 1200x1200 DpIxDpI 916<li>06 600x600 DpIxDpI 917</ul> 918 919<p> 920The last letter stands for a quality factor that effects also the print 921speed (presumably related to the number of passes that the printhead makes). 922 923<ul> 924<li>f highest quality 925<li>n normal quality 926</ul> 927 928<p> 929Printing a postcard size (~10x15 cm^2) image at 1200x1200 DpI^2 takes about 9303 minutes. The output of Ghostscript is then typically 4-5 MByte. The 931bootleneck seems to be the transfer of the raster image in run-length 932encoded Canon format to the printer (via the parallel port on my system) or 933the printer's speed, not Ghostscript or the uniprint renderer. 934 935<h3>Further Optimization for the Canon BJC-8200</h3> 936 937So far I have only experimented with the printer initialization code at the 938beginning of each page (-dupBeginPageCommand) and the resolution (-r). Other 939options, particularly the transfer arrays (-dupBlackTransfer, 940-dupCyanTransfer, -dupMagentaTransfer, -dupYellowTransfer) and the margins 941(-dupMargins) were simply copied from the files for the BJC-610, but they 942may need to be changed for optimized performance. 943 944<p> 945Here is information useful for changing or adding uniprint control files for 946the BJC-8200: 947 948<p> 949In "-dupBeginPageCommand=..." use the line 950 951<blockquote> 952 1b28 64 0400 04b0 04b0 953</blockquote> 954 955<p> 956for 1200x1200 resolution, and 957 958<blockquote> 959 1b28 64 0400 0258 0258 960</blockquote> 961 962<p> 963for 600x600. The "-r" option in the control file must of course match this 964line. Other resolutions might work as well, but I didn't try. 965 966<p> 967Crucial are the numbers in the lines like 968 969<blockquote><pre> 970 1b28 63 0300 3005 04 971 ^ ^ 972 Plain Paper 0 4 Highest quality 973 OHP transparency 2 . 974 T-shirt transfer 3 . 975 Glossy Photo Film 5 . 976 High Gloss Paper 6 0 Lowest quality 977 Photo Paper Pro 9 978</pre></blockquote> 979 980<h3>Outlook</h3> 981 982<p> 983Presently uniprint can use the black (K), cyan (C), magenta (M), and 984yellow (Y) colors in the BJC-8200. The unused colors are photo (or 985light) cyan (c) and magenta (m). Also the Canon driver seems to use 986only CMYK, for example when printing on Photo Paper Pro in "Camera" or 987"SuperPhoto" mode. These modes supposedly produce prints of the best 988quality that the Canon driver can offer. Other modes of Canon driver 989do use up to all six color cartridges (CMYKcm). Therefore expanding 990uniprint's capabilities for six colors would be interesting, but it may 991not increase the output quality of 6-color printers such as the 992BJC-8200 drastically. 993 994<p> 995More control files for uniprint could be added in order to offer more 996versatility for controlling the BJC-8200 within a Ghostscript 997installation. The number of possible combinations for media type, resolution 998and print quality factor is very large, many combinations would not make 999much sense, many might be used here and there, but relatively rarely. The 1000user would have to remember a name for each combination that is used. 1001 1002<p> 1003A better way would be to let the user patch optionally a user owned or 1004system wide uniprint control file before each print via some print 1005tool. This is similar to the approach taken by Canon with their driver for 1006Windows. Similarly a uniprint tool could also incorporate other functions 1007such as printing test and demo pages and the low ink warning once the 1008protocol for this is known. Clearly it would be difficult to code such a 1009uniprint tool for all the platforms where Ghostscript is running. 1010 1011<h3>Usage on RedHat Linux</h3> 1012 1013<p> 1014In order to install a BJC-8200 printer on a RedHat Linux system with 1015RedHat's printtool, you need also to insert with a text editor the contents 1016of the file <b><tt>bj8.rpd</tt></b> into the RedHat printer database 1017<b><tt>/usr/lib/rhs/rhs-printfilters/printerdb</tt></b>. Insert it most 1018appropriately after the section 1019 1020<blockquote><pre> 1021StartEntry: U_CanonBJC610 1022. 1023. 1024. 1025EndEntry 1026 1027< --- insert here "bj8.rpd" from this distribution: 1028< --- StartEntry: U_CanonBJC8200 1029 . 1030 . 1031 . 1032</pre></blockquote> 1033 1034<h3>Contacting the Author</h3> 1035 1036<p> 1037E-mail address: <<a 1038href="mailto:scb@stelab.nagoya-u.ac.jp">scb@stelab.nagoya-u.ac.jp</a>> 1039 1040<p> 1041Footnotes: 1042 1043<p> 1044(*) Actually I have a F850, not a BJC-8200. That model is sold for the 1045Japanese market only. The specs and also the external look are the 1046same as those of the BJC-8200 models for the American and European 1047markets. I expect that the raster image mode which is used exclusively 1048by Ghostscript is entirely compatible for both models. 1049 1050<p> 1051Stephan C. Buchert 1052 1053<hr> 1054 1055<h2><a name="BJC"></a>Other Canon BubbleJet (BJC) printers</h2> 1056 1057<p> 1058This section was contributed by the author of the drivers, Yves Arrouye 1059(<<a href="mailto:yves.arrouye@usa.net">yves.arrouye@usa.net</a>>, but 1060please do not send questions to him: he no longer maintains these drivers.) 1061The drivers handle Canon BJC-600, BJC-4xxx, BJC-70, Stylewriter 2x00, and 1062BJC-800 printers. 1063 1064<h3><a name="BJC_history"></a>History</h3> 1065 1066<p> 1067The BJC-600 driver was written in the first place by Yoshio Kuniyoshi and 1068later modified by Yves Arrouye. We tried to make it evolve synchronously, 1069though Yoshio cannot be reached since a long time ago. The drivers are 1070based on code for the HP printers by George Cameron (in fact, they are in 1071the same file!), so he's the first person to thank. 1072 1073<p> 1074The 2.00 version of the drivers was a complete rewrite of the driver 1075(arguments, optimization, colour handling, in short: everything!) by Yves 1076Arrouye. That release was also the first one to be able to use the full 1077width of an A3 paper size. PostScript Printer Description (PPD) files for 1078the drivers were released with version 2.15. They are incomplete, 1079but they can be used to drive the printers' main features. 1080 1081<h3><a name="BJC_build"></a>Configuring and building the BJC drivers</h3> 1082 1083<h4><a name="BJC_defaults"></a>Modify values in 1084<b><tt>gdevbjc.h</tt></b></h4> 1085 1086<p> 1087Configure the drivers by modifying the default values in the file 1088<b><tt>gdevbjc.h</tt></b> or on the compilation line. If you don't do 1089that, the drivers use reasonable defaults that make them work "as 1090expected". All default values shown here are defined in that file. 1091 1092<h4><a name="BJC_CMYK_RGB"></a>CMYK-to-RGB color conversion</h4> 1093 1094<p> 1095By default, the drivers use the same algorithm as Ghostscript to convert 1096CMYK colors to RGB. If you prefer to use Adobe formulas, define 1097<b><tt>USE_ADOBE_CMYK_RGB</tt></b> when compiling. (See the top of the 1098file <b><tt>gdevcdj.c</tt></b> to see the difference between the two.) 1099 1100<h4><a name="BJC_vertical_centering"></a>Vertical centering of the 1101printable area</h4> 1102 1103<p> 1104The drivers center the imageable area horizontally but not vertically, so 1105that what can be printed does use the most of the output media. If you 1106define <b><tt>BJC_DEFAULT_CENTEREDAREA</tt></b> when compiling, then the 1107top and bottom margins will be the same, resulting in a (smaller) 1108vertically centered imageable area also. 1109 1110<h4><a name="BJC_margins"></a>Page margins</h4> 1111 1112<p> 1113If you define <b><tt>USE_RECOMMENDED_MARGINS</tt></b>, then the top and 1114bottom margins will be the same (that is, 1115<b><tt>BJC_DEFAULT_CENTEREDAREA</tt></b> will be defined for you) and the 1116margins will be the 12.4mm recommended by Canon. Since margins are 1117complicated (because one must rely on the mechanical precision of the 1118printer), the drivers do something about the bottom margin: by default the 1119bottom margin is 9.54mm for the BJC-600 driver and 7mm for the BJC-800. If 1120you define <b><tt>USE_TIGHT_MARGINS</tt></b>, then the bottom margin is 7mm 1121for both drivers (but I never managed to get my own BJC-600 to print a line 1122on this low bound, hence the larger default). Regardless of the presence 1123of this definition, <b><tt>USE_FIXED_MARGINS</tt></b> will not allow the 1124BJC-800 to use the lower 7mm bottom margin, so if you have a problem with 1125the bottom margin on a BJC-800, just define that (without defining 1126<b><tt>USE_TIGHT_MARGINS</tt></b>, of course). 1127 1128<p> 1129A quick way to be sure the margins you selected is to print a file whose 1130contents are: 1131 1132<blockquote><b><tt> 1133%!<br> 1134clippath stroke showpage 1135</tt></b></blockquote> 1136 1137<p> 1138If the margins are okay, you will get a rectangle visibly surrounding 1139the printable area. If they're not correct, one or more of the sides will 1140be either incomplete or completely unprinted. 1141 1142<h4><a name="BJC_compile"></a>Makefile and compilation</h4> 1143 1144<p> 1145Make sure the <b><tt>bjc600</tt></b> or <b><tt>bjc800</tt></b> devices are 1146in <a href="Make.htm#Features_and_devices"><b><tt>DEVICE_DEVS</tt></b> in 1147the makefile</a>; that is, look in the makefile for your platform and add 1148them if necessary -- they may already be there. As of Ghostscript 5.10, 1149for instance, one makefile has 1150 1151<blockquote><b><tt> 1152DEVICE_DEVS6=bj10e.dev bj200.dev bjc600.dev bjc800.dev 1153</tt></b></blockquote> 1154 1155<h3><a name="BJC_usage"></a>Use of the drivers</h3> 1156 1157<p> 1158There are two drivers here. The "<b><tt>bjc600</tt></b>" one supports the BJC-600 and 1159BJC-4xxx (maybe the BJC-70 as well) and the "<b><tt>bjc800</tt></b>" one supports the 1160BJC-800 series. Remarks here that apply to both drivers use the name 1161"bjc". 1162 1163<h4><a name="BJC_options"></a>Supported Options and Defaults</h4> 1164 1165<p> 1166Note: "options", "properties", and "parameters" designate the same thing: 1167device parameters that you can change. 1168 1169<p> 1170Giving an option an incorrect value causes an error. Unless stated 1171otherwise, this error will be a rangecheckerror. Options may be set from 1172the Ghostscript command line (using the <b><tt>-d</tt></b> and 1173<b><tt>-s</tt></b> switches or other predetermined switches if they have an 1174effect on the driver) or using the PostScript Level 2 1175<b><tt>setpagedevice</tt></b> operator if Ghostscript has been compiled 1176with the <b><tt>level2</tt></b> or <b><tt>level3</tt></b> device (which it should 1177<b><tt>;-)</tt></b>). There are <b>no</b> special-purpose operators such as 1178one was able to find in Level 1 printers. 1179 1180<p> 1181The bjc uses 24 bits per pixel by default (unless you change the value of 1182<b><tt>BJC_BITSPERPIXEL</tt></b>), corresponding to CMYK printing. 1183Supported modes are 1 bpp and 4 bpp (gray levels), 8 bpp, 16 bpp, 24 bpp 1184and 32 bpp (colours). Colours are preferably stored in the CMYK model 1185(which means, for example, that with 16 bpp there are only 16 different 1186shades of each color) but it is possible to store them as RGB color for 1187some depths. Some modes do Floyd-Steinberg dithering and some don't, but 1188use the default Ghostscript halftoning (in fact, when halftoning is used, 1189dithering takes also place but because of the low point density it is 1190usually not efficient, and thus invisible). 1191 1192<blockquote><table cellpadding=0 cellspacing=0> 1193<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Descriptions of printing modes by bpp and <b><tt>Colors</tt></b></font><hr> 1194<tr valign=bottom> 1195 <th align=left>bpp 1196 <td> 1197 <th align=left><b><tt>Colors</tt></b> 1198 <td> 1199 <th align=left>Mode 1200<tr> <td colspan=5><hr> 1201<tr valign=top> <td>32 1202 <td> 1203 <td align=center>4 1204 <td> 1205 <td>CMYK colour printing, Floyd-Steinberg dithering 1206<tr valign=top> <td>24 1207 <td> 1208 <td align=center>4 1209 <td> 1210 <td>The same. (But each primary colour is stored on 6 bits instead of 8.) 1211<tr valign=top> <td>24 1212 <td> 1213 <td align=center>3 1214 <td> 1215 <td>RGB colour printing, Floyd-Steinberg dithering. This mode does 1216 <b><tt>not</tt></b> use the black cartridge (that's why it 1217 exists, for when you don't want to use it <b><tt>;-)</tt></b>). 1218 Each primary colour is stored in 8 bits as in the 32/4 mode, 1219 but black generation and under-color removal are done on the 1220 driver side and not by Ghostscript, so you have no control over 1221 it. (This mode is no longer supported in this driver.) 1222<tr valign=top> <td>16 1223 <td> 1224 <td align=center>4 1225 <td> 1226 <td>CMYK colour printing, halftoned by Ghostscript. F-S dithering 1227 is still visible here (but the halftone patterns are visible 1228 too!). 1229<tr valign=top> <td>8 1230 <td> 1231 <td align=center>4 1232 <td> 1233 <td>The same. (But each primary colour is stored in 2 bits instead of 4.) 1234<tr valign=top> <td>8 1235 <td> 1236 <td align=center>3 1237 <td> 1238 <td>RGB colour printing. This mode is not intended for use. What I 1239 mean is that it should be used only if you want to use custom 1240 halftone screens <b>and</b> the halftoning is broken using the 1241 8/4 mode (some versions of Ghostscript have this problem). 1242<tr valign=top> <td>8 1243 <td> 1244 <td align=center>1 1245 <td> 1246 <td>Gray-level printing, Floyd-Steinberg dithering 1247<tr valign=top> <td>1 1248 <td> 1249 <td align=center>1 1250 <td> 1251 <td>Gray-level printing halftoned by Ghostscript 1252</table></blockquote> 1253 1254<p> 1255These modes are selected using the <b><tt>BitsPerPixel</tt></b> <b>and</b> 1256<b><tt>Colors</tt></b> integer options (either from the command line or in 1257a PostScript program using <b><tt>setpagedevice</tt></b>). See below. 1258 1259<p> 1260A note about darkness of what is printed: Canon printers do print dark, 1261really. And the Floyd-Steinberg dithering may eventually darken your image 1262too. So you may need to apply gamma correction by calling Ghostscript as in 1263 1264<blockquote><b><tt> 1265gs -sDEVICE=bjc600 gamma.ps myfile.ps 1266</tt></b></blockquote> 1267 1268<p> 1269where <b><tt>gamma.ps</tt></b> changes the gamma correction (here to 3 for 1270all colors); 0.45 gives me good results, but your mileage may vary. The 1271bigger the value the lighter the output: 1272 1273<blockquote><b><tt> 1274{ 0.45 exp } dup dup currenttransfer setcolortransfer 1275</tt></b></blockquote> 1276 1277<p> 1278The drivers support printing at 90dpi, 180dpi and 360dpi. Horizontal and 1279vertical resolutions must be the same or a limitcheck error will happen. A 1280rangecheck will happen too if the resolution is not 128190 ×2^<small><sup><b>N</b></sup></small>. If the driver 1282is compiled with <b><tt>-DBJC_STRICT</tt></b> a rangecheck also happens if 1283the resolution is not one of those supported. This is not the case, as we 1284expect that there may be a 720dpi bjc some day. 1285 1286<p> 1287Here are the various options supported by the bjc drivers, along with 1288their types, supported values, effects, and usage: 1289 1290<dl> 1291<dt><b><tt>BitsPerPixel</tt></b> (int) 1292<dd>Choose the depth of the page. Valid values are 1, 8, 16, 24 (the 1293default) and 32. 1294 1295<p> 1296Note that when this is set for the first time, the <b><tt>Colors</tt></b> 1297property is automatically adjusted unless it is also specified. The table 1298here shows the corresponding color models and the rendering method visible: 1299"GS" for Ghostscript halftoning and "F-S" for Floyd-Steinberg dithering. 1300When both are present it means that the dithering of halftones is visible. 1301Default choices are indicated by asterisk "*". 1302 1303<blockquote><table cellpadding=0 cellspacing=0> 1304<tr><th colspan=9 bgcolor="#CCCC00"><hr><font size="+1">Valid <b><tt>Colors</tt></b> values for<br>allowed <b><tt>BitsPerPixel</tt></b> values 1305</font><hr> 1306<tr valign=bottom> 1307 <th align=left>bpp 1308 <td> 1309 <th align=left><b><tt>Colors</tt></b> 1310 <td> 1311 <th align=left> 1312 <td> 1313 <th align=left>Color model 1314 <td> 1315 <th align=left>Dithering 1316<tr> <td colspan=9><hr> 1317<tr valign=top> <td>32 1318 <td> 1319 <td align=center>4 1320 <td> 1321 <td> 1322 <td align=center> 1323 <td>CMYK 1324 <td> 1325 <td>F-S 1326<tr valign=top> <td>24 1327 <td> 1328 <td align=center>4 1329 <td> 1330 <td><b>*</b> 1331 <td align=center> 1332 <td>CMYK 1333 <td> 1334 <td>F-S 1335<tr valign=top> <td> 1336 <td> 1337 <td align=center>3 1338 <td> 1339 <td> 1340 <td align=center> 1341 <td>RGB 1342 <td> 1343 <td>F-S 1344<tr valign=top> <td>16 1345 <td> 1346 <td align=center>4 1347 <td> 1348 <td> 1349 <td align=center> 1350 <td>CMYK 1351 <td> 1352 <td>GS, F-S 1353<tr valign=top> <td>8 1354 <td> 1355 <td align=center>4 1356 <td> 1357 <td><b>*</b> 1358 <td align=center> 1359 <td>CMYK 1360 <td> 1361 <td>GS 1362<tr valign=top> <td> 1363 <td> 1364 <td align=center>3 1365 <td> 1366 <td> 1367 <td align=center> 1368 <td>RGB 1369 <td> 1370 <td>GS 1371<tr valign=top> <td> 1372 <td> 1373 <td align=center>1 1374 <td> 1375 <td> 1376 <td align=center> 1377 <td>K (CMYK) 1378 <td> 1379 <td>F-S 1380<tr valign=top> <td>1 1381 <td> 1382 <td align=center>1 1383 <td> 1384 <td><b>*</b> 1385 <td align=center> 1386 <td>K (CMYK) 1387 <td> 1388 <td>GS 1389</table></blockquote> 1390 1391<p>Also note that automagical change of one parameter depending on the 1392other one does not work in a <b><tt>setpagedevice</tt></b> call. This 1393means that if you want to change <b><tt>BitsPerPixel</tt></b> to a value 1394whose valid <b><tt>Colors</tt></b> values do not include the actual 1395<b><tt>Colors</tt></b> value, you must change <b><tt>Colors</tt></b> too. 1396</dl> 1397 1398<dl> 1399<dt><b><tt>Colors</tt></b> (int) 1400<dd>Choose the number of color components from among 1, 3 and 4 (the 1401default). This setting cannot be used in a PostScript program, only on 1402Ghostscript's command line. See <b><tt>ProcessColorModel</tt></b> below 1403for what to use to change the number of colors with PostScript code. 1404 1405<p> 1406Note that setting this property does limit the choices of 1407<b><tt>BitsPerPixel</tt></b>. As for the previous property, its first 1408setting may induce a setting of the "other value" 1409(<b><tt>BitsPerPixel</tt></b> here). The table here indicates valid 1410combinations with "V", default values with asterisk "*". 1411 1412<blockquote><table cellpadding=0 cellspacing=0> 1413<tr><th colspan=13 bgcolor="#CCCC00"><hr><font size="+1">Valid <b><tt>BitsPerPixel</tt></b> values<br>for allowed <b><tt>Colors</tt></b> values</font><hr> 1414<tr valign=top> <td> 1415 <td> 1416 <td> 1417 <td> 1418 <th align=left colspan=9><b><tt>BitsPerPixel</tt></b> OK values<hr> 1419<tr valign=top> <th>Colors 1420 <td> 1421 <th>Type 1422 <td> 1423 <td>32 1424 <td> 1425 <td>24 1426 <td> 1427 <td>16 1428 <td> 1429 <td>8 1430 <td> 1431 <td>1 1432<tr> <td colspan=13><hr> 1433<tr valign=top> <td>4 1434 <td> 1435 <td>CMYK 1436 <td> 1437 <td><b>V</b> 1438 <td> 1439 <td><b>*</b> 1440 <td> 1441 <td><b>V</b> 1442 <td> 1443 <td><b>V</b> 1444 <td> 1445 <td> 1446<tr valign=top> <td>3 1447 <td> 1448 <td>RGB 1449 <td> 1450 <td> 1451 <td> 1452 <td><b>*</b> 1453 <td> 1454 <td> 1455 <td> 1456 <td><b>V</b> 1457 <td> 1458 <td> 1459<tr valign=top> <td>1 1460 <td> 1461 <td>K 1462 <td> 1463 <td> 1464 <td> 1465 <td> 1466 <td> 1467 <td> 1468 <td> 1469 <td><b>V</b> 1470 <td> 1471 <td><b>*</b> 1472</table></blockquote> 1473 1474<p>Also note that automagical change of one parameter depending on the 1475other one does not work in a <b><tt>setpagedevice</tt></b> call. This 1476means that if you want to change <b><tt>Colors</tt></b> to a value whose 1477valid <b><tt>BitsPerPixel</tt></b> values don't include the actual 1478<b><tt>BitsPerPixel</tt></b> value, you must change 1479<b><tt>BitsPerPixel</tt></b> too. 1480</dl> 1481 1482<dl> 1483<dt><b><tt>ProcessColorModel</tt></b> (symbol) 1484<dd>A symbol taken from <b><tt>/DeviceGray</tt></b>, 1485<b><tt>/DeviceRGB</tt></b> or <b><tt>/DeviceCMYK</tt></b> which can be used 1486to select 1, 3 or 4 colors respectively. Note that this parameter takes 1487precedence over <b><tt>Colors</tt></b>, and that both affect the same 1488variable of the driver. (See <b><tt>Colors</tt></b> above for values 1489combined with <b><tt>BitsPerPixel</tt></b>.) 1490</dl> 1491 1492<dl> 1493<dt><b><tt>HWResolution</tt></b> (floats array) 1494<dd>An array of two floats giving the horizontal and vertical resolution in 1495dots per inch from among 90, 180 and 360 (the default). Both values must 1496be the same. On the Ghostscript command line, the resolution may be 1497changed with the <a href="Use.htm#Resolution_switch"><b><tt>-r</tt></b> 1498switch</a>. 1499</dl> 1500 1501<dl> 1502<dt><b><tt>ManualFeed</tt></b> (bool) 1503<dd>Indicate that the sheets won't be fed automatically by the printer, 1504<b><tt>false</tt></b> by default. (Not meaningful on the BJC-600, I fear.) 1505</dl> 1506 1507<dl> 1508<dt><b><tt>MediaType</tt></b> (string) 1509<dd>The media to print on, chosen from among "<b><tt>PlainPaper</tt></b>", 1510"<b><tt>CoatedPaper</tt></b>", "<b><tt>TransparencyFilm</tt></b>", 1511"<b><tt>Envelope</tt></b>", "<b><tt>Card</tt></b>" and 1512"<b><tt>Other</tt></b>". Default is "<b><tt>PlainPaper</tt></b>". For 1513"<b><tt>Envelope</tt></b>", "<b><tt>Card</tt></b>" or 1514"<b><tt>Other</tt></b>" the driver puts the printer into thick mode 1515automatically regardless of the actual media weight. 1516</dl> 1517 1518<dl> 1519<dt><b><tt>MediaWeight</tt></b> (int or null) 1520<dd>The weight of the media in grams per square meter. Null (the default) 1521indicates that the weight is of no importance. If the specified media 1522weight is greater than 105 (that is, the value of the compilation default 1523<b><tt>BJC</tt></b>???<b><tt>_MEDIAWEIGHT_THICKLIMIT</tt></b>) then the 1524printer will be set to use thick paper. 1525</dl> 1526 1527<dl> 1528<dt><b><tt>PrintQuality</tt></b> (string) 1529<dd>The quality of printing. 1530<table cellpadding=0 cellspacing=0> 1531<tr valign=bottom> 1532 <th align=left>Value 1533 <td> 1534 <th align=left><b><tt>bjc600</tt></b> 1535 <td> 1536 <th align=left><b><tt>bjc800</tt></b> 1537 <td> 1538 <th align=left> 1539<tr> <td colspan=7><hr> 1540<tr valign=top> <td><b><tt>Low</tt></b> 1541 <td> 1542 <td> 1543 <td> 1544 <td align=center><b>X</b> 1545 <td> 1546 <td>Has the effect of making only two printing passes instead of four, so should be twice the speed; known as "CN" (Color Normal) mode 1547<tr valign=top> <td><b><tt>Draft</tt></b> 1548 <td> 1549 <td align=center><b>X</b> 1550 <td> 1551 <td align=center><b>X</b> 1552 <td> 1553 <td>Unlights the "HQ" light on a BJC-600 1554<tr valign=top> <td><b><tt>Normal</tt></b> 1555 <td> 1556 <td align=center><b>X</b> 1557 <td> 1558 <td align=center><b>X</b> 1559 <td> 1560 <td>Default for both drivers; lights the "HQ" light on a BJC-600 1561<tr valign=top> <td><b><tt>High</tt></b> 1562 <td> 1563 <td align=center><b>X</b> 1564 <td> 1565 <td align=center><b>X</b> 1566 <td> 1567 <td>Means 200% black and 100% CMY; lights the "Bk+" light on a BJC-600 1568</table> 1569</dl> 1570 1571<dl> 1572<dt><b><tt>DitheringType</tt></b> (string) 1573<dd>Dithering algorithm from between "<b><tt>Floyd-Steinberg</tt></b>" and 1574"<b><tt>None</tt></b>". "<b><tt>None</tt></b>" is the default for 1/1 print 1575mode, "<b><tt>Floyd-Steinberg</tt></b>" for other modes. At the moment 1576this parameter is read-only, though no error is generated if one tries to 1577change it. This parameter is not of much value at the moment and is here 1578mainly to reserve the name for future addition of dithering algorithms. 1579</dl> 1580 1581<dl> 1582<dt><b><tt>PrintColors</tt></b> (int) 1583<dd>Mask for printing color. If 0, use black for any color; otherwise the 1584value must be the sum of any of 1 (cyan), 2 (magenta), 4 (yellow) and 8 1585(black), indicating which colors will be used for printing. When printing 1586colour, only colours specified will be printed (this means that some planes 1587will be missing if a color's value above is omitted). When printing grays, 1588black is used if it is present in the <b><tt>PrintColors</tt></b>; 1589otherwise, the image is printed by superimposing each requested color. 1590</dl> 1591 1592<dl> 1593<dt><b><tt>MonochromePrint</tt></b> (bool) 1594<dd><b>For <tt>bjc600</tt> only</b>, <b><tt>false</tt></b> by default. 1595Substitute black for Cyan, Magenta and Yellow when printing -- useful, for 1596example, to get some monochrome output of a dithered printing This is a 1597hardware mechanism as opposed to the previous software one. I think that 1598using this or setting <b><tt>PrintColors</tt></b> to 0 will give the same 1599results. 1600</dl> 1601 1602<p> 1603Note that the <b><tt>MediaType</tt></b> and <b><tt>ThickMedia</tt></b> 1604options will be replaced by the use of the device 1605<b><tt>InputAttributes</tt></b> and <b><tt>OutputAttributes</tt></b> as 1606soon as possible. Please note too that the print mode may be reset at the 1607start of printing, not at the end. This is the expected behaviour. If you 1608need to reset the printer to its default state, simply print a file that 1609does just a <b><tt>showpage</tt></b>. 1610 1611<h4><a name="BJC_device_info"></a>Device information</h4> 1612 1613<p> 1614Here is other information published by the driver that you will find 1615in the <b><tt>deviceinfo</tt></b> dictionary. 1616 1617<dl> 1618<dt><b><tt>OutputFaceUp</tt></b> (bool) 1619<dd>This has the boolean value <b><tt>true</tt></b>, indicating that the 1620sheets are stacked face up. 1621</dl> 1622 1623<dl> 1624<dt><b><tt>Version</tt></b> (float) 1625<dd>In the form <b>M.</b><em>mm</em>pp, where <b>M</b> is the major 1626version, <em>mm</em> the bjc driver's minor version, and pp the specific 1627driver minor version (that is, <b><tt>M.</tt></b><em>mm</em> will always be 1628the same for the <b><tt>bjc600</tt></b> and <b><tt>bjc800</tt></b> 1629drivers). 1630</dl> 1631 1632<dl> 1633<dt><b><tt>VersionString</tt></b> (string) 1634<dd> A string showing the driver version and other indications. At the 1635moment, things like "a" or "b" may follow the version to indicate alpha or 1636beta versions. The date of the last change to this version is given in the 1637form MM/DD/YY (no, it won't adapt to your locale). 1638</dl> 1639 1640<h4><a name="BJC_HW_margins"></a>Hardware margins</h4> 1641 1642<p> 1643The BJC printers have top and bottom hardware margins of 3mm and 7.1mm 1644respectively (Canon says 7mm, but this is unusable because of the rounding 1645of paper sizes to PostScript points). The left margin is 3.4mm for A4 and 1646smaller paper sizes, 6.4mm for U.S. paper sizes, envelopes and cards. It 1647is 4.0mm for A3 paper on the BJC-800. 1648 1649<p> 1650The maximum printing width of a BJC-600 printer is 203mm. The maximum 1651printing width of a BJC-800 printer is 289mm on A3 paper, 203mm on 1652U.S. letter and ISO A4 paper. 1653 1654<h4><a name="BJC_PPD"></a>PostScript printer description (PPD) files</h4> 1655 1656<p> 1657The files <b><tt>CBJC600.PPD</tt></b> and <b><tt>CBJC800.PPD</tt></b> (whose 1658long names are, respectively, <b><tt>Canon_BubbleJetColor_600.ppd</tt></b> 1659and <b><tt>Canon_BubbleJetColor_800.ppd</tt></b>) are PPD files to drive the 1660features of the <b><tt>bjc600</tt></b> and <b><tt>bjc800</tt></b> drivers. 1661They can be used, for example, on NextStep systems (presumably on OpenStep 1662systems too) and on Unix systems with Adobe's TranScript and 1663<b><tt>pslpr</tt></b> (not tested). The files are not complete at the 1664moment. Please note that NextStep's printing interface does not 1665correctly enforce constraints specified in these files (in UIConstraints 1666descriptions): you must force yourself to use valid combinations of 1667options. 1668 1669<h4><a name="BJC_PPD_custom"></a>Customizing the PPD files</h4> 1670 1671<p> 1672By default the PPD files are set for U.S. letter size paper, and they use a 1673normalized transfer function. If you choose to use A4 printing by default, 1674you must replace "<b><tt>Letter</tt></b>" with "<b><tt>A4</tt></b>" in 1675these (noncontiguous) lines: 1676 1677<blockquote> 1678 [...]<br> 1679<b><tt>*DefaultPageSize: Letter<br></tt></b> 1680 [...]<br> 1681<b><tt>*DefaultRegion: Letter<br></tt></b> 1682 [...]<br> 1683<b><tt>*DefaultImageableArea: Letter</tt></b><br> 1684 [...]<br> 1685</blockquote> 1686 1687<p> 1688Some versions of Ghostscript have problems with normalized colors, which 1689makes them add magenta in gray levels. If you experience this problem, 1690in the PPD file replace the line 1691 1692<blockquote><b><tt> 1693*DefaultTransfer: Normalized 1694</tt></b></blockquote> 1695 1696<p> 1697with the alternate line 1698 1699<blockquote><b><tt> 1700*DefaultTransfer: Null 1701</tt></b></blockquote> 1702 1703<p> 1704The "thick media" option is implemented by choosing a value of 120 or 80 1705(for thick and thin media respectively) for the <b><tt>MediaWeight</tt></b> 1706feature of the drivers. If you ever change the threshold for thick media 1707in the driver code, you may need to change the values in the PPD files too. 1708 1709<p> 1710All customization should be done using the "<b><tt>*Include:</tt></b>" 1711feature of PPD files so that your local changes will be retained if you 1712update the PPD files. 1713 1714<h3><a name="BJC_bugs"></a>How to report problems</h3> 1715 1716<p> 1717Yves Arrouye no longer maintains this driver, and will not answer questions 1718about it. If you are posting a question about it in a public form, please 1719be as descriptive as possible, and please send information that can be used 1720to reproduce the problem. Don't forget to say which driver you use, and in 1721what version. Version information can be found in the source code of the 1722driver or by issuing the following command in a shell: 1723 1724<blockquote><b><tt> 1725echo "currentpagedevice /VersionString get ==" | gs -q -sDEVICE=bjc600 - 1726</tt></b></blockquote> 1727 1728<h3><a name="BJC_acks"></a>Acknowledgements</h3> 1729 1730<p> 1731I am particularly grateful to Yoshio Kuniyoshi <<a 1732href="mailto:yoshio@nak.math.keio.ac.jp">yoshio@nak.math.keio.ac.jp</a>> 1733without whom I'd never make these drivers, and also to L. Peter Deutsch, 1734who answered all my (often silly) questions about Ghostscript's driver 1735interface. 1736 1737<p> 1738Thanks also to the people who volunteered to beta-test the v2.x BJC 1739drivers: David Gaudine 1740<<a href="mailto:david@donald.concordia.ca">david@donald.concordia.ca</a>>, 1741Robert M. Kenney <<a href="mailto:rmk@unh.edu">rmk@unh.edu</a>>, 1742James McPherson 1743<<a href="mailto:someone@erols.com">someone@erols.com</a>> 1744and Ian Thurlbeck 1745<<a href="mailto:ian@stams.strath.ac.uk">ian@stams.strath.ac.uk</a>> 1746(listed alphabetically) were particularly helpful by discovering bugs and 1747helping find out exact paper margins on printers I don't have access to. 1748 1749<p> 1750And many thanks to Klaus-Gunther Hess 1751<<a href="mailto:ghess@elmos.de">ghess@elmos.de</a>> for looking 1752at the dithering code and devising a good CMYK dithering algorithm for the 1753Epson Stylus Color, which I then adapted to the code of these drivers. 1754 1755<hr> 1756 1757<h2><a name="STC_epson_stylus"></a>Epson Stylus color printer (see also <b><tt>uniprint</tt></b>)</h2> 1758 1759<p> 1760This section was contributed by Gunther Hess 1761<<a href="mailto:ghess@elmos.de">ghess@elmos.de</a>>, who also wrote 1762<b><tt>uniprint</tt></b>, a later set of drivers. You should probably see 1763the section on <a href="#Uniprint"><b><tt>uniprint</tt></b></a> for whether 1764it might be better for your uses than this driver. 1765 1766<h3><a name="STC_usage"></a>Usage</h3> 1767 1768<p> 1769 1770This driver is selected with "<b><tt>-sDEVICE=stcolor</tt></b>", producing 1771output for an Epson Stylus Color at 360dpi resolution by default. But it 1772can do much more with this printer, and with significantly better quality, 1773than with the default mode; and it can also produce code for monochrome 1774versions of the printer. This can be achieved via either command-line 1775options or Ghostscript input. For convenience a PostScript file is 1776supplied for use as an initial input file. Try the following command: 1777 1778<blockquote> 1779<b><tt>gs -sDEVICE=stcolor -r</tt></b><b>{Xdpi}</b><b><tt>x</tt></b><b>{Ydpi}</b><b><tt> stcolor.ps</tt></b> <b>{YourFile.ps}</b> 1780</blockquote> 1781 1782<p> 1783where <b>{Xdpi}</b> is one of 180, 360, or 720 and <b>{Ydpi}</b> is one of 178490, 180, 360, or 720. The result should be significantly better. You may 1785use <b><tt>stcolor.ps</tt></b> with other devices too, but I do not 1786recommend this, since it does nothing then. <b><tt>stcolor.ps</tt></b> 1787should be available with binary distributions and should reside in the same 1788directory as other Ghostscript initialization files or in the same 1789directory as the files to be printed. Thus if Ghostscript is part of your 1790printer-spooler, you can insert 1791 1792<blockquote><b><tt> 1793(stcolor.ps) findlibfile { pop run } if pop 1794</tt></b></blockquote> 1795 1796<p> 1797in files you want to use the improved algorithms. You may want to adapt 1798<b><tt>stcolor.ps</tt></b> file to your specific needs. The methods and 1799options for this are described here, but this description is restricted to 1800Ghostscript options, while their manipulation at the PostScript level is 1801documented in the material on <a href="Language.htm">the relationship of 1802Ghostscript and PostScript</a> and in <b><tt>stcolor.ps</tt></b>. 1803 1804<h3><a name="STC_options"></a>Options</h3> 1805 1806<p> 1807Now to explain the options (as written on my UNIX system). The order is 1808somehow related to their use during the printing process: 1809 1810<dl> 1811<dt><b><tt>-dUnidirectional</tt></b> 1812<dd>Force unidirectional printing, recommended for transparencies 1813</dl> 1814 1815<dl> 1816<dt><b><tt>-dMicroweave</tt></b> 1817<dd>Enable the printer's "microweave" feature; see 1818"<a href="#What_is_weaving">What is weaving?</a>" below. 1819</dl> 1820 1821<dl> 1822<dt><b><tt>-dnoWeave</tt></b> 1823<dd>Disable any Weaving (overrides <b><tt>-dMicroweave</tt></b>) 1824</dl> 1825 1826<dl> 1827<dt><b><tt>-dSoftweave</tt></b> 1828<dd>Enable the driver's internal weaving. Note that <b><tt>Softweave</tt></b> works <b>only</b> with the original Stylus Color and the PRO-Series. 1829</dl> 1830 1831<dl> 1832<dt><b><tt>-sDithering=</tt></b><em>{name}</em> 1833<dd>Select another dithering algorithm (name) from among 1834<blockquote><table cellpadding=0 cellspacing=0> 1835<tr valign=top> <td><b><tt>gscmyk</tt></b> 1836 <td> 1837 <td>fast color output, CMYK process color model (default) 1838<tr valign=top> <td><b><tt>gsmono</tt></b> 1839 <td> 1840 <td>fast monochrome output 1841<tr valign=top> <td><b><tt>gsrgb</tt></b> 1842 <td> 1843 <td>fast color output, RGB process color model 1844<tr valign=top> <td><b><tt>fsmono</tt></b> 1845 <td> 1846 <td>Floyd-Steinberg, monochrome 1847<tr valign=top> <td><b><tt>fsrgb</tt></b> 1848 <td> 1849 <td>Floyd-Steinberg, RGB process color model (almost identical to the <b><tt>cdj550</tt></b>/<b><tt>bjc</tt></b> algorithm) 1850<tr valign=top> <td><b><tt>fsx4</tt></b> 1851 <td> 1852 <td>Floyd-Steinberg, CMYK process color model (shares code with <b><tt>fsmono</tt></b> and <b><tt>fsrgb</tt></b>, but is algorithmically really bad) 1853<tr valign=top> <td><b><tt>fscmyk</tt></b> 1854 <td> 1855 <td>Floyd-Steinberg, CMYK process color model and proper modifications for CMYK 1856<tr valign=top> <td><b><tt>hscmyk</tt></b> 1857 <td> 1858 <td>modified Floyd-Steinberg with CMYK model ("hs" stands for "hess" not for "high speed", but the major difference from <b><tt>fscmyk</tt></b> is speed) 1859<tr valign=top> <td><b><tt>fs2</tt></b> 1860 <td> 1861 <td>algorithm by Steven Singer (RGB) should be identical to <b><tt>escp2cfs2</tt></b>. 1862</table></blockquote> 1863</dl> 1864 1865<dl> 1866<dt><b><tt>-dBitsPerPixel=</tt></b><em>{1...32}</em> 1867<dd>number of bits used for pixel storage; the larger the value, the better 1868the quality -- at least in theory. In <b><tt>fsrgb</tt></b> one can gain 1869some speed by restricting to 24 bits rather than the default 30. 1870</dl> 1871 1872<dl> 1873<dt><b><tt>-dFlag0</tt></b> 1874<dd>causes some algorithms to select a uniform initialisation rather than a 1875set of random values. May yield a sharper image impression at the cost of 1876dithering artifacts. (Applies to <b><tt>hscmyk</tt></b> and all fs modes, 1877except for fs2, which always uses a constant initialization.) 1878</dl> 1879 1880<dl> 1881<dt><b><tt>-dFlag1</tt></b> ... <b><tt>-dFlag4</tt></b> 1882<dd>Available for future algorithms. 1883</dl> 1884 1885<dl> 1886<dt><b><tt>-dColorAdjustMatrix='{</tt></b><em>three, nine, or sixteen 1887floating-point values</em><b><tt>}'</tt></b> 1888<dd>This is a matrix to adjust the colors. Values should be between -1.0 1889and 1.0, and the number of values depends on the color model the selected 1890algorithm uses. In RGB and CMYK modes a matrix with 1.0 on the diagonal 1891produces no transformation. This feature is really required, but I could 1892not identify a similar feature at the language level, so I implemented it, 1893but I don't know reasonable values yet. 1894</dl> 1895 1896<dl> 1897<dt><b><tt>-dCtransfer='{</tt></b><em>float float ...</em><b><tt>}'</tt></b> or 1898<dt><b><tt>-dMtransfer=</tt></b>..., <b><tt>-dY</tt></b>..., <b><tt>-dK</tt></b>... or 1899<dt><b><tt>-dRtransfer='{</tt></b><em>float float ...</em><b><tt>}'</tt></b> or 1900<dt><b><tt>-dG</tt></b>..., <b><tt>-dB</tt></b>... or 1901<dt><b><tt>-dKtransfer='{</tt></b><em>float float ...</em><b><tt>}'</tt></b> 1902<dd>Which you use depends on the algorithm, which may be either either 1903CMYK, RGB or monochrome. The values are arrays of floats in the range from 19040 to 1.0, representing the visible color intensity for the device. One may 1905achieve similar effects with <b><tt>setcolortransfer</tt></b> at the 1906language level, but this takes more time and the underlying code for the 1907driver-specific parameters is still required. The size of the arrays is 1908arbitrary and the defaults are "<b><tt>{0.0 1.0}</tt></b>", which is a 1909linear characteristic. Most of the code in <b><tt>stcolor.ps</tt></b> are 1910better transfer arrays. 1911</dl> 1912 1913<dl> 1914<dt><b><tt>-dKcoding='{</tt></b><em>float...</em><b><tt>}'</tt></b> 1915<dt><b><tt>-dC</tt></b>..., <b><tt>-dM</tt></b>... etc. 1916<dd>Arrays between 0.0 and 1.0, controlling the internal coding of the 1917color values. Clever use of these arrays may yield further enhancements, 1918but I have no experience yet. (To be discontinued with version 2.x.) 1919</dl> 1920 1921<dl> 1922<dt><b><tt>-sModel=st800</tt></b> 1923<dd>Causes output to be suitable for the monochrome Stylus 800 (no weaving, 1924no color). 1925</dl> 1926 1927<dl> 1928<dt><b><tt>-sOutputCode=</tt></b><em>{name}</em> 1929<dd>Can be either "<b><tt>plain</tt></b>", "<b><tt>runlength</tt></b>" or 1930"<b><tt>deltarow</tt></b>" and changes the ESC/P2 coding technique 1931used by the driver. The default is to use runlength encoding. 1932"<b><tt>plain</tt></b>" selects uncompressed encoding and generates 1933enormous amounts of data. 1934</dl> 1935 1936<dl> 1937<dt><b><tt>-descp_Band=</tt></b><em>1/8/15/24</em> 1938<dd>Number of nozzles of scanlines used in printing, Useful only with 1939<b><tt>-dnoWeave</tt></b>. Larger Values yield smaller code, but this 1940doesn't increase the printing speed. 1941</dl> 1942 1943<dl> 1944<dt><b><tt>-descp_Width=</tt></b><em>N</em> 1945<dd>Number of pixels Printed in each scan Line. (Useful only when tuning 1946margins; see below) 1947</dl> 1948 1949<dl> 1950<dt><b><tt>-descp_Height=</tt></b><em>pixels</em> 1951<dd>Length of the entire page in pixels. (Parameter of 1952"<b><tt>ESC(C</tt></b>" in default initialization.) 1953</dl> 1954 1955<dl> 1956<dt><b><tt>-descp_Top=</tt></b><em>scan lines</em> 1957<dd>Top margin in scan lines. (First parameter of "<b><tt>ESC(c</tt></b>" 1958in default initialization.) 1959</dl> 1960 1961<dl> 1962<dt><b><tt>-descp_Bottom=</tt></b><em>scan lines</em> 1963<dd>Bottom margin in scan lines. (Second parameter of 1964"<b><tt>ESC(c</tt></b>" in default initialization.) 1965</dl> 1966 1967<dl> 1968<dt><b><tt>-sescp_Init=</tt></b>"<em>string</em>" 1969<dd>Override for the initialization sequence. (Must set graphics mode 1 1970and units.) 1971</dl> 1972 1973<dl> 1974<dt><b><tt>-sescp_Release=</tt></b>"<em>string</em>" 1975<dd>Overrides the release sequence, "<b><tt>ESC @ FF</tt></b>" by 1976default. 1977</dl> 1978 1979<p> 1980ESC/P2 allows any resolutions to be valid in theory, but only 1981<b><tt>-r360x360</tt></b> (the default) and <b><tt>-r720x720</tt></b> (not 1982on STC-IIs ? and st800) are known to work with most printers. 1983 1984<p> 1985 1986<blockquote><table cellpadding=0 cellspacing=0> 1987<tr><th colspan=7 bgcolor="#CCCC00"><hr><font size="+1">Valid option combinations<br>Stylus I & Pro-Series only</font><hr> 1988<tr valign=bottom> 1989 <th valign=bottom align=left>Resolution 1990 <td> 1991 <th valign=bottom align=left><b><tt>escp_Band</tt></b> 1992 <td> 1993 <th valign=bottom align=left>Weave usable 1994 <td> 1995 <th valign=bottom align=left><b><tt>escp_Band</tt></b> &<br>number of passes 1996<tr> <td colspan=7><hr> 1997<tr valign=top> <td>180x90 1998 <td> 1999 <td>15 2000 <td> 2001 <td><b><tt>noWeave</tt></b> 2002 <td> 2003 <td> 2004<tr valign=top> <td>180x180 2005 <td> 2006 <td>1 , 8, 24 2007 <td> 2008 <td><b><tt>noWeave</tt></b>, <b><tt>Microweave</tt></b> 2009 <td> 2010 <td>15/2 <b><tt>SoftWeave</tt></b> 2011<tr valign=top> <td>180x360 2012 <td> 2013 <td> 2014 <td> 2015 <td> 2016 <td> 2017 <td>15/4 <b><tt>SoftWeave</tt></b> 2018<tr valign=top> <td>180x720 2019 <td> 2020 <td> 2021 <td> 2022 <td> 2023 <td> 2024 <td>15/8 <b><tt>SoftWeave</tt></b> 2025<tr valign=top> <td>360x90 2026 <td> 2027 <td>15 2028 <td> 2029 <td><b><tt>noWeave</tt></b> 2030 <td> 2031 <td> 2032<tr valign=top> <td>360x180 2033 <td> 2034 <td>1, 8, 24 2035 <td> 2036 <td><b><tt>noWeave</tt></b>, <b><tt>Microweave</tt></b> 2037 <td> 2038 <td>15/2 <b><tt>SoftWeave</tt></b> 2039<tr valign=top> <td>360x360 2040 <td> 2041 <td>1, 8, 24 2042 <td> 2043 <td><b><tt>noWeave</tt></b>, <b><tt>Microweave</tt></b> 2044 <td> 2045 <td>15/4 <b><tt>SoftWeave</tt></b> 2046<tr valign=top> <td>360x720 2047 <td> 2048 <td> 2049 <td> 2050 <td> 2051 <td> 2052 <td>15/8 <b><tt>SoftWeave</tt></b> 2053<tr valign=top> <td>720x90 2054 <td> 2055 <td>15 2056 <td> 2057 <td><b><tt>noWeave</tt></b> 2058 <td> 2059 <td> 2060<tr valign=top> <td>720x180 2061 <td> 2062 <td> 2063 <td> 2064 <td> 2065 <td> 2066 <td>15/2 <b><tt>SoftWeave</tt></b> 2067<tr valign=top> <td>720x360 2068 <td> 2069 <td> 2070 <td> 2071 <td> 2072 <td> 2073 <td>15/4 <b><tt>SoftWeave</tt></b> 2074<tr valign=top> <td>720x720 2075 <td> 2076 <td>1 2077 <td> 2078 <td><b><tt>noWeave</tt></b>, <b><tt>Microweave</tt></b> 2079 <td> 2080 <td>15/8 <b><tt>SoftWeave</tt></b> 2081</table></blockquote> 2082 2083<blockquote> 2084<b>Beware:</b> there are only few validity checks for parameters. A good 2085example is <b><tt>escp_Band</tt></b>: if you set this, the driver uses your 2086value even if the value is not supported by the printer. <b>You asked for 2087it and you got it!</b> 2088</blockquote> 2089 2090<h3><a name="STC_FAQ"></a>Application note and FAQ</h3> 2091 2092<p> 2093Quite a bunch of parameters. Hopefully you never need any of them, besides 2094feeding <b><tt>stcolor.ps</tt></b> to Ghostscript in front of your input. 2095 2096<p> 2097After answering some questions over fifty times I prepared a FAQ. Here is 2098version 1.3 of the FAQ, as of <b><tt>stcolor</tt></b> version 1.20 (for 2099Ghostscript 3.50). 2100 2101<h4><a name="STC_FAQ_A3"></a>Support for A3 paper</h4> 2102 2103<p> 2104Yes, this driver supports the A3-size printer: merely set the required 2105pagesize and margins. A simple way to do this is to specify the 2106command-line switch "<b><tt>-sPAPERSIZE=a3</tt></b>" or include the 2107procedure call "<b><tt>a3</tt></b>" in the PostScript prolog section. To 2108optimize the printable area or set the proper margins, see the next 2109paragraph. 2110 2111<h4><a name="STC_FAQ_margins"></a>Margins, PageSize</h4> 2112 2113<p> 2114I refuse to add code to <b><tt>stcolor</tt></b> that tries to guess the 2115proper margins or page size, because I found that such guessing is usually 2116wrong and needs correction in either the source or the parameters. You can 2117modify <b><tt>stcolor.ps</tt></b> to do that, however. After the line 2118 2119<blockquote><b><tt> 2120mark % prepare stack for "putdeviceprops" 2121</tt></b></blockquote> 2122 2123<p> 2124insert these lines, which define page size and margins in points: 2125 2126<blockquote> 2127<pre>/.HWMargins [9.0 39.96 12.6 9.0] % Left, bottom, right, top (1/72") 2128/PageSize [597.6 842.4] % Paper, including margins (1/72") 2129/Margins [ % neg. Offset to Left/Top in Pixels 2130 4 index 0 get STCold /HWResolution get 0 get mul 72 div neg 2131 5 index 3 get STCold /HWResolution get 1 get mul 72 div neg 2132]</pre></blockquote> 2133 2134<p> 2135Feel free to change the values of <b><tt>.HWMargins</tt></b> and 2136<b><tt>PageSize</tt></b> to match your needs; the values given are the 2137defaults when the driver is compiled with "<b><tt>-DA4</tt></b>". This 2138option or its omission may cause trouble: the Stylus Color can print up to 2139exactly 8 inches (2880 pixels) at 360dpi. The remaining paper is the 2140margin, where the left margin varies only slightly with the paper size, 2141while the right margin is significantly increased for wider paper, such as 2142U.S. letter size. 2143 2144<p> 2145<b>Note</b> that if you are using an ISO paper size with a version of 2146<b><tt>stcolor</tt></b> after 1.20 and compiled without 2147"<b><tt>-DA4</tt></b>", then the default margin is too large, and you need 2148to add the proper "<b><tt>.HWMargins</tt></b>" to the command line or to 2149<b><tt>stcolor.ps</tt></b>. 2150 2151<h4><a name="STC_FAQ_II_IIS_1500"></a>Stylus Color II / IIs and 1500</h4> 2152 2153<p> 2154First the good news: the driver can print on the Stylus Color II. 2155Now the bad news: 2156<ul> 2157<li>According to Epson support the driver "abuses" the color 2158capabilities. (See "Future Plans" for details.) 2159<li>You need some parameters on the command line (or in 2160<b><tt>stcolor.ps</tt></b>). 2161<li>I doubted that it would be usable with the Stylus Color IIs, but 2162it <b>is</b> usable and suffers from mixing problems! 2163</ul> 2164 2165<p> 2166 2167To make things work, you <b>MUST</b> disable the driver's internal 2168weaving (<b><tt>Softweave</tt></b>), in one of these two ways: 2169 2170<blockquote> 2171<b><tt>gs -dMicroweave</tt></b> ...<br> 2172<b><tt>gs -dnoWeave -descp_Band=1</tt></b> ... 2173</blockquote> 2174 2175<p> 2176Version 1.90, current as of Ghostscript 5.10, fixes this bug by new default 2177behaviour. I experienced significantly increased printing speed with the 2178second variant on the old Stylus Color, when printing mostly monochrome 2179data. 2180 2181<h3><a name="STC_recommendations"></a>Recommendations</h3> 2182 2183<p> 2184The next section is a contribution from Jason Patterson <jason@reflections.com.au> 2185who evaluated a previous version (1.17). Ghostscript was invoked as follows: 2186 2187<blockquote><dl compact> 2188<dt><b><tt>gs</tt></b> 2189<dd><b><tt>-sDEVICE=stcolor -r720x720 2190-sDithering=</tt></b>... <b><tt>-sOutputFile=escp.out stcolor.ps 2191whatsoever.ps</tt></b> 2192 2193</dl></blockquote> 2194 2195<p> 2196where "..." is the name of the desired algorithm. 2197<b><tt>stcolor.ps</tt></b> was omitted for the gs-algorithms 2198(<b><tt>gsmono</tt></b>, <b><tt>gsrgb</tt></b> and <b><tt>gscmyk</tt></b>), 2199for which it is useless and would not allow the selection of 2200"<b><tt>gscmyk</tt></b>". 2201 2202<h4><a name="STC_dither_experiment"></a>Color dithering experiments with 2203<b><tt>gdevstc</tt></b> 1.21</h4> 2204 2205<p> 2206Here are data about the EPSON Stylus Color driver's different dithering 2207methods, based on a little experiment using four good quality scanned 2208images of quite varied nature, to begin with, a summary of the results of 2209the four experiments. <b>Sanity note:</b> the results here are from only 2210four images and a total of 24 printouts (eight on 720dpi paper, sixteen on 2211plain paper). Your results will almost certainly vary, and your standards 2212might not be the same as mine, so use these results only as a guide, not as 2213a formal evaluation. 2214 2215<blockquote><table cellpadding=0 cellspacing=0> 2216<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Quality of output by method</font><hr> 2217<tr valign=bottom> 2218 <th align=left> 2219 <td> 2220 <th align=left> 2221<tr> <td colspan=3><hr> 2222<tr> <td valign=top><b><tt>gsmono</tt></b> 2223<td> 2224<td>Pretty much what you'd expect from a mono ordered pattern. 2225Looks like what a lot of mono laser printers produce. 2226<tr> <td valign=top><b><tt>fsmono</tt></b> 2227<td> 2228<td>Excellent for monochrome. 2229<tr> <td valign=top><b><tt>gscmyk</tt></b> 2230<td> 2231<td>Not very good, but expected from an ordered pattern. 2232<tr> <td valign=top><b><tt>gsrgb</tt></b> 2233<td> 2234<td>A little better than <b><tt>gscmyk</tt></b>. More consistent 2235looking. 2236<tr> <td valign=top><b><tt>fs2</tt></b> 2237<td> 2238<td>Good, but not quite as good as <b><tt>fsrgb</tt></b>. Gets the 2239brightness wrong: too light at 720dpi, too dark at 360dpi. 2240<tr> <td valign=top><b><tt>fsrgb</tt></b> 2241<td> 2242<td>Very good, but a little too dark and has a slight blue tint. 2243<tr> <td valign=top><b><tt>hscmyk</tt></b> 2244<td> 2245<td>Excellent. Slightly better than <b><tt>fsrgb</tt></b> and 2246<b><tt>fs2</tt></b>. Better than <b><tt>fscmyk</tt></b> on 2247some images, almost the same on most. 2248<tr> <td valign=top><b><tt>fscmyk</tt></b> 2249<td> 2250<td>Best. Very, very slightly better than <b><tt>hscmyk</tt></b>. 2251On some images nearly as good as the EPSON demos done with 2252the MS Windows driver. 2253</table></blockquote> 2254 2255<blockquote><table cellpadding=0 cellspacing=0> 2256<tr><th colspan=4 bgcolor="#CCCC00"><hr><font size="+1">Overall visual quality (1-10), best to worst</font><hr> 2257<tr valign=top> <th colspan=4 align=left>Monochrome 2258<tr> <td> 2259 <td><b><tt>fsmono</tt></b> 2260 <td> 2261 <td><b><tt>******************</tt></b> 2262<tr> <td> 2263 <td><b><tt>gsmono</tt></b> 2264 <td> 2265 <td><b><tt>**********</tt></b> 2266<tr> <td> 2267 <td> 2268 <td> 2269 <td><b><tt>0 1 2 3 4 5 6 7 8 9 10</tt></b> 2270<tr> <td colspan=4><hr> 2271<tr valign=top> <th colspan=4 align=left>Colour 2272<tr> <td> 2273 <td><b><tt>fscmyk</tt></b> 2274 <td> 2275 <td><b><tt>*******************</tt></b> 2276<tr> <td> 2277 <td><b><tt>hscmyk</tt></b> 2278 <td> 2279 <td><b><tt>*******************</tt></b> 2280<tr> <td> 2281 <td><b><tt>fsrgb</tt></b> 2282 <td> 2283 <td><b><tt>******************</tt></b> 2284<tr> <td> 2285 <td><b><tt>fs2</tt></b> 2286 <td> 2287 <td><b><tt>*****************</tt></b> 2288<tr> <td> 2289 <td><b><tt>gsrgb</tt></b> 2290 <td> 2291 <td><b><tt>**********</tt></b> 2292<tr> <td> 2293 <td><b><tt>gscmyk</tt></b> 2294 <td> 2295 <td><b><tt>*********</tt></b> 2296<tr> <td> 2297 <td> 2298 <td> 2299 <td><b><tt>0 1 2 3 4 5 6 7 8 9 10</tt></b> 2300</table></blockquote> 2301 2302<h3><a name="STC_color_transform"></a>Color transformation</h3> 2303 2304<p> 2305In the initial version of the driver distributed with Ghostscript 3.33, the 2306parameter "<b><tt>SpotSize</tt></b>" was the only way to manipulate the 2307colors at the driver level. According to the parameters enumerated above, 2308this has changed significantly with version 1.16 and above as a result an 2309ongoing discussion about dithering algorithms and "false color" on the 2310Epson Stylus Color. This initiated the transformation of the 2311<b><tt>stcolor</tt></b> driver into a framework for different dithering 2312algorithms, providing a generalized interface to the internal Ghostscript 2313color models and the other data structures related to Ghostscript drivers. 2314 2315<p> 2316The main thing such a framework should be able to do is to deliver the 2317values the dithering algorithm needs; and since this directly influences 2318the optical image impression, this transformation should be adjustable 2319without the need for recompilation and relinking. In general the process 2320can be described as follows: 2321 2322<blockquote><table cellpadding=0 cellspacing=0> 2323<tr valign=top> <td colspan=3><b><tt>ColorAdjustMatrix</tt></b> 2324 <td align=center>Coding 2325 <td colspan=3> 2326 <td align=center>Transfer 2327 <td colspan=3> 2328<tr valign=top> <td>| 2329 <td align=center>Ghostscript color 2330 <td>| 2331 <td align=center>=> 2332 <td>| 2333 <td align=center>Ghostscript raster 2334 <td>| 2335 <td align=center>=> 2336 <td>| 2337 <td align=center>Dithering data 2338 <td>| 2339<tr valign=top> <td>| 2340 <td> 2341 <td>| 2342 <td> 2343 <td>| 2344 <td align=center>1/2/4/8/16/32-bit 2345 <td>| 2346 <td> 2347 <td>| 2348 <td> 2349 <td>| 2350<tr valign=top> <td>| 2351 <td align=center>1/3/4 16-bit values 2352 <td>| 2353 <td> 2354 <td>| 2355 <td align=center>1/3/4 values 2356 <td>| 2357 <td> 2358 <td>| 2359 <td align=center>(arbitrary type) 2360 <td>| 2361</table></blockquote> 2362 2363<p> 2364Due to the limitations on raster storage, information is lost in the first 2365transformation step, except for the 16-bit monochrome mode. So any color 2366adjustment should take place before this step and this is where the optional 2367<b><tt>ColorAdjustMatrix</tt></b> works. 2368 2369<p> 2370The first transformation step, called "coding", is controlled by the 2371<b><tt>?coding</tt></b> arrays. The decoding process expands the range of 2372values expontentially to a larger range than that provided by the initial 2373Ghostscript color model, and is therefore a reasonable place to make 2374device- or algorithm-specific adjustments. This is where the 2375<b><tt>?transfer</tt></b> arrays are used. Array access might be not the 2376fastest method, but its generality is superior, so this step is always 2377based upon internally algorithm-specific array access. If 8 bits are stored 2378per color component and if the algorithm uses bytes too, the second 2379transformation is included within the first, which saves significant 2380computation time when printing the data. 2381 2382<h3><a name="STC_CAM"></a><b><tt>ColorAdjustMatrix</tt></b></h3> 2383 2384<p> 2385The driver supports different values for <b><tt>ProcessColorModel</tt></b>, 2386which raises the need for different color adjustments. Here 2387"<b><tt>CAM</tt></b>" stands for "<b><tt>ColorAdjustMatrix</tt></b>". 2388 2389<dl> 2390<dt><b><tt>DeviceGray</tt></b> (three floats) 2391<dd><pre>if ((r == g) && (g == b)) 2392 K' = 1.0 - R; 2393else 2394 K' = 1.0 - CAM[0] * R + CAM[1] * G + CAM[2] * B;</pre> 2395 2396<p> 2397According to the <a href="Drivers.htm">documentation on drivers</a>, the 2398latter (the "else" clause) should never happen. 2399</dl> 2400 2401<dl> 2402<dt><b><tt>DeviceRGB</tt></b> (nine floats) 2403<dd><pre>if((r == g) && (g == b)) 2404 R' = B' = G' = R; 2405else 2406 R' = CAM[0]*R + CAM[1]*G + CAM[2]*B; 2407 G' = CAM[3]*R + CAM[4]*G + CAM[5]*B; 2408 B' = CAM[6]*R + CAM[7]*G + CAM[8]*B;</pre> 2409 2410<p> 2411The printer always uses four inks, so a special treatment of black is 2412provided. Algorithms may take special action if R, G, and B are all 2413equal. 2414</dl> 2415 2416<dl> 2417<dt><b><tt>DeviceCMYK</tt></b> (sixteen floats) 2418<dd> 2419<pre>if((c == m) && (m == y)) 2420 K' = max(C,K); 2421 C' = M' = Y' = 0; 2422else 2423 K = min(C,M,Y); 2424 if((K > 0) && ColorAdjustMatrix_present) { => UCR 2425 C -= K; 2426 M -= K; 2427 Y -= K; 2428 } 2429 2430 C' = CAM[ 0]*C + CAM[ 1]*M + CAM[ 2]*Y + CAM[ 3]*K; 2431 M' = CAM[ 4]*C + CAM[ 5]*M + CAM[ 6]*Y + CAM[ 7]*K; 2432 Y' = CAM[ 8]*C + CAM[ 9]*M + CAM[10]*Y + CAM[11]*K; 2433 K' = CAM[12]*C + CAM[13]*M + CAM[14]*Y + CAM[15]*K;</pre> 2434 2435<p> 2436Again we have a special black treatment. "<b><tt>max(C,K)</tt></b>" was introduced 2437because of a slight misbehaviour of Ghostscript, which delivers 2438black under certain circumstances as (1,1,1,0). Normally, when 2439no special black separation and undercolor removal procedures 2440are defined at the PostScript level, either (C,M,Y,0) or (0,0,0,K) 2441values are mapped. This would make the extended <b><tt>ColorAdjustMatrix</tt></b> 2442quite tedious, and so during mapping, black separation is done for 2443(C,M,Y,0) requests; and if there is a <b><tt>ColorAdjustMatrix</tt></b>, undercolor 2444removal is used too. In other words the default matrix is: 2445 2446<blockquote><table> 2447<tr> <td>1 <td>0 <td>0 <td>1 2448<tr> <td>0 <td>1 <td>0 <td>1 2449<tr> <td>0 <td>0 <td>1 <td>1 2450<tr> <td>0 <td>0 <td>0 <td>1 2451</table></blockquote> 2452 2453<p> 2454and it is applied to CMYK values with separated and removed black. Raising 2455the CMY coefficients while lowering the K coefficients reduces black and 2456intensifies color. But be careful, because even small deviations from the 2457default cause drastic changes. 2458</dl> 2459 2460<p> 2461If no <b><tt>ColorAdjustMatrix</tt></b> is set, the matrix computations are 2462skipped. Thus the transformation reduces to range inversion in monochrome 2463mode and black separation in CMYK mode. 2464 2465<h3><a name="STC_RGBCMYK_coding"></a>RGB / CMYK coding and transfer, and <b><tt>BitsPerPixel</tt></b></h3> 2466 2467<p> 2468These two (groups of) parameters are arrays of floating-point numbers in 2469the range 0.0 to 1.0. They control the truncation to the desired number of 2470bits stored in raster memory (<b><tt>BitsPerPixel</tt></b>) and the ink 2471density. The "truncation" may become a nonlinear function if any of the 2472<b><tt>?coding</tt></b> arrays is set. Assume the following Ghostscript 2473invocation: 2474 2475<blockquote><pre>gs -sDEVICE=stcolor -sDithering=fscmyk -dBitsPerPixel=16 \ 2476 -dKcoding='{ 0.0 0.09 0.9 1.0 }' \ 2477 -dMcoding='{ 0.0 0.09 0.9 1.0 }' \ 2478 -dKtransfer='{ 0.0 0.09 0.9 1.0 }' \ 2479 -dYtransfer='{ 0.0 0.09 0.9 1.0 }'</pre> 2480</blockquote> 2481 2482<p> 2483We may have either or both of <b><tt>?coding</tt></b> and 2484<b><tt>?transfer</tt></b>, giving four possible combinations. (These four 2485combinations appear in the given example.) The resulting mapping appears 2486in the following tables, where except for the internal Indices (4 2487components × 4 bits = 16 <b><tt>BitsPerPixel</tt></b>), all values 2488are normalized to the range 0 to 1. The actual range is 0 to 65535 for the 2489Ghostscript color and 0 to 16777215 for the ink values delivered to the 2490<b><tt>fscmyk</tt></b> algorithm. Sorry for the bunch of numbers 2491following, but you may try this example in conjunction with 2492<b><tt>stcinfo.ps</tt></b>, which should give you a graphical printout of 2493the following numbers when you issue a <b><tt>showpage</tt></b> command. 2494 2495<blockquote><table cellpadding=0 cellspacing=0> 2496<tr> <td> 2497 <td> 2498 <th colspan=5>Cyan<hr> 2499 <td> 2500 <th colspan=5>Magenta<hr> 2501<tr valign=top> <th>CI/15 2502 <td> 2503 <th>gs_color_values 2504 <td> 2505 <th>CI 2506 <td> 2507 <th>Ink 2508 <td> 2509 <th>gs_color_values 2510 <td> 2511 <th>CI 2512 <td> 2513 <th>Ink 2514<tr> <td colspan=13><hr> 2515<tr valign=top> <td align=center>0.000 2516 <td> 2517 <td align=center>0.000 - 0.062 2518 <td> 2519 <td align=right>0 2520 <td> 2521 <td align=center>0.000 2522 <td> 2523 <td align=center>-0.123 - 0.123 2524 <td> 2525 <td align=right>0 2526 <td> 2527 <td align=center>0.000 2528<tr valign=top> <td align=center>0.067 2529 <td> 2530 <td align=center>0.063 - 0.125 2531 <td> 2532 <td align=right>1 2533 <td> 2534 <td align=center>0.067 2535 <td> 2536 <td align=center>0.123 - 0.299 2537 <td> 2538 <td align=right>1 2539 <td> 2540 <td align=center>0.247 2541<tr valign=top> <td align=center>0.133 2542 <td> 2543 <td align=center>0.125 - 0.187 2544 <td> 2545 <td align=right>2 2546 <td> 2547 <td align=center>0.133 2548 <td> 2549 <td align=center>0.299 - 0.365 2550 <td> 2551 <td align=right>2 2552 <td> 2553 <td align=center>0.351 2554<tr valign=top> <td align=center>0.200 2555 <td> 2556 <td align=center>0.188 - 0.250 2557 <td> 2558 <td align=right>3 2559 <td> 2560 <td align=center>0.200 2561 <td> 2562 <td align=center>0.365 - 0.392 2563 <td> 2564 <td align=right>3 2565 <td> 2566 <td align=center>0.379 2567<tr valign=top> <td align=center>0.267 2568 <td> 2569 <td align=center>0.250 - 0.312 2570 <td> 2571 <td align=right>4 2572 <td> 2573 <td align=center>0.267 2574 <td> 2575 <td align=center>0.392 - 0.420 2576 <td> 2577 <td align=right>4 2578 <td> 2579 <td align=center>0.406 2580<tr valign=top> <td align=center>0.333 2581 <td> 2582 <td align=center>0.313 - 0.375 2583 <td> 2584 <td align=right>5 2585 <td> 2586 <td align=center>0.333 2587 <td> 2588 <td align=center>0.420 - 0.447 2589 <td> 2590 <td align=right>5 2591 <td> 2592 <td align=center>0.433 2593<tr valign=top> <td align=center>0.400 2594 <td> 2595 <td align=center>0.375 - 0.437 2596 <td> 2597 <td align=right>6 2598 <td> 2599 <td align=center>0.400 2600 <td> 2601 <td align=center>0.447 - 0.475 2602 <td> 2603 <td align=right>6 2604 <td> 2605 <td align=center>0.461 2606<tr valign=top> <td align=center>0.467 2607 <td> 2608 <td align=center>0.438 - 0.500 2609 <td> 2610 <td align=right>7 2611 <td> 2612 <td align=center>0.467 2613 <td> 2614 <td align=center>0.475 - 0.502 2615 <td> 2616 <td align=right>7 2617 <td> 2618 <td align=center>0.488 2619<tr valign=top> <td align=center>0.533 2620 <td> 2621 <td align=center>0.500 - 0.562 2622 <td> 2623 <td align=right>8 2624 <td> 2625 <td align=center>0.533 2626 <td> 2627 <td align=center>0.502 - 0.529 2628 <td> 2629 <td align=right>8 2630 <td> 2631 <td align=center>0.516 2632<tr valign=top> <td align=center>0.600 2633 <td> 2634 <td align=center>0.563 - 0.625 2635 <td> 2636 <td align=right>9 2637 <td> 2638 <td align=center>0.600 2639 <td> 2640 <td align=center>0.529 - 0.557 2641 <td> 2642 <td align=right>9 2643 <td> 2644 <td align=center>0.543 2645<tr valign=top> <td align=center>0.667 2646 <td> 2647 <td align=center>0.625 - 0.687 2648 <td> 2649 <td align=right>10 2650 <td> 2651 <td align=center>0.667 2652 <td> 2653 <td align=center>0.557 - 0.584 2654 <td> 2655 <td align=right>10 2656 <td> 2657 <td align=center>0.571 2658<tr valign=top> <td align=center>0.733 2659 <td> 2660 <td align=center>0.688 - 0.750 2661 <td> 2662 <td align=right>11 2663 <td> 2664 <td align=center>0.733 2665 <td> 2666 <td align=center>0.584 - 0.612 2667 <td> 2668 <td align=right>11 2669 <td> 2670 <td align=center>0.598 2671<tr valign=top> <td align=center>0.800 2672 <td> 2673 <td align=center>0.750 - 0.812 2674 <td> 2675 <td align=right>12 2676 <td> 2677 <td align=center>0.800 2678 <td> 2679 <td align=center>0.612 - 0.639 2680 <td> 2681 <td align=right>12 2682 <td> 2683 <td align=center>0.626 2684<tr valign=top> <td align=center>0.867 2685 <td> 2686 <td align=center>0.813 - 0.875 2687 <td> 2688 <td align=right>13 2689 <td> 2690 <td align=center>0.867 2691 <td> 2692 <td align=center>0.639 - 0.715 2693 <td> 2694 <td align=right>13 2695 <td> 2696 <td align=center>0.653 2697<tr valign=top> <td align=center>0.933 2698 <td> 2699 <td align=center>0.875 - 0.937 2700 <td> 2701 <td align=right>14 2702 <td> 2703 <td align=center>0.933 2704 <td> 2705 <td align=center>0.715 - 0.889 2706 <td> 2707 <td align=right>14 2708 <td> 2709 <td align=center>0.778 2710<tr valign=top> <td align=center>1.000 2711 <td> 2712 <td align=center>0.938 - 1.000 2713 <td> 2714 <td align=right>15 2715 <td> 2716 <td align=center>1.000 2717 <td> 2718 <td align=center>0.889 - 1.111 2719 <td> 2720 <td align=right>15 2721 <td> 2722 <td align=center>1.000 2723</table></blockquote> 2724 2725<p> 2726The difference between cyan and magenta is the presence of a coding array. 2727The coding process must map a range of color values to each of the sixteen 2728component indices. If no coding array is given, this is accomplished 2729by dividing by 4096, equivalent to a right shift by 12 bits. The 2730final ink density resides in the given interval and moves from the left to 2731the right side from 0 to 15. For magenta there is a coding array 2732and the ink value matches the center of the intervals. But the distribution 2733of the mapped intervals follows the given coding array and is nonlinear in 2734the linear color space of Ghostscript. 2735 2736<p> 2737Now let us take a look at the case with transfer arrays: 2738 2739<blockquote><table cellpadding=0 cellspacing=0> 2740<tr> <td> 2741 <td> 2742 <th colspan=5>Yellow<hr> 2743 <td> 2744 <th colspan=5>Black<hr> 2745<tr valign=top> <th>CI/15 2746 <td> 2747 <th>gs_color_values 2748 <td> 2749 <th>CI 2750 <td> 2751 <th>Ink 2752 <td> 2753 <th>gs_color_values 2754 <td> 2755 <th>CI 2756 <td> 2757 <th>Ink 2758<tr> <td colspan=13><hr> 2759<tr valign=top> <td align=center>0.000 2760 <td> 2761 <td align=center>0.000 - 0.062 2762 <td> 2763 <td align=right>0 2764 <td> 2765 <td align=center>0.000 2766 <td> 2767 <td align=center>-0.123 - 0.123 2768 <td> 2769 <td align=right>0 2770 <td> 2771 <td align=center>0.000 2772<tr valign=top> <td align=center>0.067 2773 <td> 2774 <td align=center>0.063 - 0.125 2775 <td> 2776 <td align=right>1 2777 <td> 2778 <td align=center>0.018 2779 <td> 2780 <td align=center>0.123 - 0.299 2781 <td> 2782 <td align=right>1 2783 <td> 2784 <td align=center>0.067 2785<tr valign=top> <td align=center>0.133 2786 <td> 2787 <td align=center>0.125 - 0.187 2788 <td> 2789 <td align=right>2 2790 <td> 2791 <td align=center>0.036 2792 <td> 2793 <td align=center>0.299 - 0.365 2794 <td> 2795 <td align=right>2 2796 <td> 2797 <td align=center>0.133 2798<tr valign=top> <td align=center>0.200 2799 <td> 2800 <td align=center>0.188 - 0.250 2801 <td> 2802 <td align=right>3 2803 <td> 2804 <td align=center>0.054 2805 <td> 2806 <td align=center>0.365 - 0.392 2807 <td> 2808 <td align=right>3 2809 <td> 2810 <td align=center>0.200 2811<tr valign=top> <td align=center>0.267 2812 <td> 2813 <td align=center>0.250 - 0.312 2814 <td> 2815 <td align=right>4 2816 <td> 2817 <td align=center>0.072 2818 <td> 2819 <td align=center>0.392 - 0.420 2820 <td> 2821 <td align=right>4 2822 <td> 2823 <td align=center>0.267 2824<tr valign=top> <td align=center>0.333 2825 <td> 2826 <td align=center>0.313 - 0.375 2827 <td> 2828 <td align=right>5 2829 <td> 2830 <td align=center>0.090 2831 <td> 2832 <td align=center>0.420 - 0.447 2833 <td> 2834 <td align=right>5 2835 <td> 2836 <td align=center>0.333 2837<tr valign=top> <td align=center>0.400 2838 <td> 2839 <td align=center>0.375 - 0.437 2840 <td> 2841 <td align=right>6 2842 <td> 2843 <td align=center>0.252 2844 <td> 2845 <td align=center>0.447 - 0.475 2846 <td> 2847 <td align=right>6 2848 <td> 2849 <td align=center>0.400 2850<tr valign=top> <td align=center>0.467 2851 <td> 2852 <td align=center>0.438 - 0.500 2853 <td> 2854 <td align=right>7 2855 <td> 2856 <td align=center>0.414 2857 <td> 2858 <td align=center>0.475 - 0.502 2859 <td> 2860 <td align=right>7 2861 <td> 2862 <td align=center>0.467 2863<tr valign=top> <td align=center>0.533 2864 <td> 2865 <td align=center>0.500 - 0.562 2866 <td> 2867 <td align=right>8 2868 <td> 2869 <td align=center>0.576 2870 <td> 2871 <td align=center>0.502 - 0.529 2872 <td> 2873 <td align=right>8 2874 <td> 2875 <td align=center>0.533 2876<tr valign=top> <td align=center>0.600 2877 <td> 2878 <td align=center>0.563 - 0.625 2879 <td> 2880 <td align=right>9 2881 <td> 2882 <td align=center>0.738 2883 <td> 2884 <td align=center>0.529 - 0.557 2885 <td> 2886 <td align=right>9 2887 <td> 2888 <td align=center>0.600 2889<tr valign=top> <td align=center>0.667 2890 <td> 2891 <td align=center>0.625 - 0.687 2892 <td> 2893 <td align=right>10 2894 <td> 2895 <td align=center>0.900 2896 <td> 2897 <td align=center>0.557 - 0.584 2898 <td> 2899 <td align=right>10 2900 <td> 2901 <td align=center>0.667 2902<tr valign=top> <td align=center>0.733 2903 <td> 2904 <td align=center>0.688 - 0.750 2905 <td> 2906 <td align=right>11 2907 <td> 2908 <td align=center>0.920 2909 <td> 2910 <td align=center>0.584 - 0.612 2911 <td> 2912 <td align=right>11 2913 <td> 2914 <td align=center>0.733 2915<tr valign=top> <td align=center>0.800 2916 <td> 2917 <td align=center>0.750 - 0.812 2918 <td> 2919 <td align=right>12 2920 <td> 2921 <td align=center>0.940 2922 <td> 2923 <td align=center>0.612 - 0.639 2924 <td> 2925 <td align=right>12 2926 <td> 2927 <td align=center>0.800 2928<tr valign=top> <td align=center>0.867 2929 <td> 2930 <td align=center>0.813 - 0.875 2931 <td> 2932 <td align=right>13 2933 <td> 2934 <td align=center>0.960 2935 <td> 2936 <td align=center>0.639 - 0.715 2937 <td> 2938 <td align=right>13 2939 <td> 2940 <td align=center>0.867 2941<tr valign=top> <td align=center>0.933 2942 <td> 2943 <td align=center>0.875 - 0.937 2944 <td> 2945 <td align=right>14 2946 <td> 2947 <td align=center>0.980 2948 <td> 2949 <td align=center>0.715 - 0.889 2950 <td> 2951 <td align=right>14 2952 <td> 2953 <td align=center>0.933 2954<tr valign=top> <td align=center>1.000 2955 <td> 2956 <td align=center>0.938 - 1.000 2957 <td> 2958 <td align=right>15 2959 <td> 2960 <td align=center>1.000 2961 <td> 2962 <td align=center>0.889 - 1.111 2963 <td> 2964 <td align=right>15 2965 <td> 2966 <td align=center>1.000 2967</table></blockquote> 2968 2969<p> 2970Yellow uses a transfer array. There is no linear correspondence between 2971the color and the ink values: this correspondence is defined through the 2972given array. In other words, the transfer arrays define a nonlinear ink 2973characteristic, which is exactly the same functionality that PostScript's 2974"(color)transfer" function provides. 2975 2976<p> 2977While for yellow the intervals match the intervals used with cyan, for 2978black the intervals match the magenta intervals. But watch the 2979correspondence between the CI/15 values and the ink density for black: this 2980is a linear distribution in the ink domain. 2981 2982<p> 2983Not a bad idea, I think. Consider the <b><tt>fs2</tt></b> algorithm: it 2984uses values in the range 0 to 255. If any transfer array were alone, some 2985of the 256 possible values would never be used and others would be used for 2986adjacent intervals several times. Establishing an identical coding array 2987solves this problem, so the full potential of the algorithm is used. 2988 2989<p> 2990Another useful feature of the coding arrays is that they are internally 2991normalized to the range 0-1. In 720x720dpi mode the transfer arrays in 2992<b><tt>stcolor.ps</tt></b> limit the dot density to about 50%, so these 2993arrays end at 0.5 (and begin at 0.5 for RGB). Because of automatic 2994normalization, these arrays can also be used as coding arrays. But of 2995course in the <b><tt>fs2</tt></b> case mentioned above, values from 0 to 2996127 will never be delivered to the algorithm, while values 128-255 are 2997delivered for adjacent intervals. 2998 2999<p> 3000To clarify the intended use of the three parameters (parameter groups), keep this in mind: 3001 3002<blockquote><ul> 3003<li><b><tt>ColorAdjustMatrix</tt></b> is never used when transferring gray 3004values. This restricts it to what the name says: adjustment of colors, 3005that is, correction for miscolored ink. Do not use it for saturation or 3006brightness control. 3007 3008<li><b><tt>?transfer</tt></b> arrays control the values delivered to the 3009driver, which in turn controls the ink quantity. Use these arrays to 3010control saturation and brightness. In general these arrays are identical 3011for all inks. If they differ they provide a simpler scheme for color 3012correction, which is not necessarily faster than the 3013<b><tt>ColorAdjustMatrix</tt></b>. 3014 3015<li><b><tt>?coding</tt></b> arrays control the color value intervals mapped 3016to the internal color indices. 3017</ul></blockquote> 3018 3019<h3><a name="What_is_weaving"></a>What is weaving?</h3> 3020 3021<p> 3022The Epson Stylus Color has a head assembly that contains two physically 3023identifiable heads, one for black and one for cyan, magenta, and yellow 3024(CMY). This makes four "logical" heads, one for each color component. 3025Each of these four heads has several jets at some vertical (Y) distance 3026from one another, so several horizontal lines can be printed of a given 3027color during one pass of the heads. From experience I think there are 3028fifteen jets per color, spaced at 1/90in. 3029 3030<p> 3031So the question arises of how to print at a Y resolution of 360dpi with 303290dpi jets. Simply by division one gets 360dpi/90dpi = 4, which tells us 3033that 4 passes of the head assembly are needed to achieve a Y resolution of 3034360dpi. 3035 3036<p> 3037Weaving is the method of how the fifteen jets are used to print adjacent 3038horizontal rows separated here by 1/360 inch: 3039 3040<blockquote><table cellpadding=0 cellspacing=0> 3041<tr><th colspan=17 bgcolor="#CCCC00"><hr><font size="+1">Print-head jets used with and without weaving</font><hr> 3042<tr> <td> 3043 <td> 3044 <th valign=bottom colspan=7>Weaving<hr> 3045 <td> 3046 <th valign=bottom colspan=7>noWeave<hr> 3047<tr valign=top> <td> 3048 <th>Pass 3049 <th>1 3050 <td> 3051 <th>2 3052 <td> 3053 <th>3 3054 <td> 3055 <th>4 3056 <td> 3057 <th>1 3058 <td> 3059 <th>2 3060 <td> 3061 <th>3 3062 <td> 3063 <th>4 3064<tr> <th>Row 3065<tr valign=top> <td align=center>0 3066 <td> 3067 <td align=center>jet 0 3068 <td> 3069 <td align=center>-- 3070 <td> 3071 <td align=center>-- 3072 <td> 3073 <td align=center>-- 3074 <td> 3075 <td align=center>jet 0 3076 <td> 3077 <td align=center>-- 3078 <td> 3079 <td align=center>-- 3080 <td> 3081 <td align=center>-- 3082<tr valign=top> <td align=center>1 3083 <td> 3084 <td align=center>-- 3085 <td> 3086 <td align=center>jet 1 3087 <td> 3088 <td align=center>-- 3089 <td> 3090 <td align=center>-- 3091 <td> 3092 <td align=center>-- 3093 <td> 3094 <td align=center>jet 0 3095 <td> 3096 <td align=center>-- 3097 <td> 3098 <td align=center>-- 3099<tr valign=top> <td align=center>2 3100 <td> 3101 <td align=center>-- 3102 <td> 3103 <td align=center>-- 3104 <td> 3105 <td align=center>jet 2 3106 <td> 3107 <td align=center>-- 3108 <td> 3109 <td align=center>-- 3110 <td> 3111 <td align=center>-- 3112 <td> 3113 <td align=center>jet 0 3114 <td> 3115 <td align=center>-- 3116<tr valign=top> <td align=center>3 3117 <td> 3118 <td align=center>-- 3119 <td> 3120 <td align=center>-- 3121 <td> 3122 <td align=center>-- 3123 <td> 3124 <td align=center>jet 3 3125 <td> 3126 <td align=center>-- 3127 <td> 3128 <td align=center>-- 3129 <td> 3130 <td align=center>-- 3131 <td> 3132 <td align=center>jet 0 3133<tr valign=top> <td align=center>4 3134 <td> 3135 <td align=center>jet 1 3136 <td> 3137 <td align=center>-- 3138 <td> 3139 <td align=center>-- 3140 <td> 3141 <td align=center>-- 3142 <td> 3143 <td align=center>jet 1 3144 <td> 3145 <td align=center>-- 3146 <td> 3147 <td align=center>-- 3148 <td> 3149 <td align=center>-- 3150<tr valign=top> <td align=center>5 3151 <td> 3152 <td align=center>-- 3153 <td> 3154 <td align=center>jet 2 3155 <td> 3156 <td align=center>-- 3157 <td> 3158 <td align=center>-- 3159 <td> 3160 <td align=center>-- 3161 <td> 3162 <td align=center>jet 1 3163 <td> 3164 <td align=center>-- 3165 <td> 3166 <td align=center>-- 3167<tr valign=top> <td align=center>6 3168 <td> 3169 <td align=center>-- 3170 <td> 3171 <td align=center>-- 3172 <td> 3173 <td align=center>jet 3 3174 <td> 3175 <td align=center>-- 3176 <td> 3177 <td align=center>-- 3178 <td> 3179 <td align=center>-- 3180 <td> 3181 <td align=center>jet 1 3182 <td> 3183 <td align=center>-- 3184<tr valign=top> <th>... 3185</table></blockquote> 3186 3187<p> 3188Now let's assume that the dot diameter is different for each individual 3189jet, but the average among the jets matches the desired resolution. With 3190weaving, adjacent rows are printed by different jets, thus some averaging 3191takes place. Without weaving, adjacent rows are printed by the same jet 3192and this makes the dot diameter deviations visible as 1/90in stripes on 3193the paper. 3194 3195<h3><a name="STC_print_modes"></a>Print mode parameters</h3> 3196 3197<p> 3198The parameters "<b><tt>Unidirectional</tt></b>", 3199"<b><tt>Microweave</tt></b>", "<b><tt>noWeave</tt></b>", 3200"<b><tt>OutputCode</tt></b>", "<b><tt>Model</tt></b>" and the given 3201resolution control the data generated for the printer. 3202 3203<h4><a name="STC_unidirectional"></a><b><tt>Unidirectional</tt></b></h4> 3204 3205<p> 3206Simply toggles the unidirectional mode of the printer. Setting 3207"<b><tt>Unidirectional</tt></b>" definitely slows printing speed, but may 3208improve the quality. I use this for printing transparencies, where fast 3209head movement could smear the ink. 3210 3211<h4><a name="STC_noweave"></a><b><tt>Microweave</tt></b>, 3212<b><tt>noWeave</tt></b> and <b><tt>OutputCode=deltarow</tt></b></h4> 3213 3214<p> 3215The first are two booleans, which implies that four combinations are 3216possible. Actually only three exist (if you don't count for 3217<b><tt>deltarow</tt></b>): <b><tt>Softweave</tt></b>, 3218<b><tt>Microweave</tt></b>, and <b><tt>noWeave</tt></b>. The first and 3219second are functionally identical, the difference being whether the driver 3220or the printer does the job. 3221 3222<p> 3223In the default <b><tt>Softweave</tt></b> mode the driver sends the data 3224properly arranged to the printer, while in <b><tt>Microweave</tt></b> mode, 3225it is the printer that arranges the data. But in general the host processor 3226is much faster than the printer's processor, and thus it is faster for the 3227host do the job. In addition to that, for 720dpi eight passes are 3228required, and the amount of buffer space needed to buffer the data for the 3229passes is far beyond the printer's memory. <b><tt>Softweave</tt></b> 3230requires an odd value of "<b><tt>escp_Band</tt></b>"; the Stylus Color 3231provides fifteen for that. 3232 3233<p> 3234"<b><tt>OutputCode</tt></b>" controls the encoding used. In the basic 3235modes, the choice consists of "plain" and "runlength". The computation of 3236runlength-encoded data does not take much time, less than the data tranfer 3237to the printer; thus this is the recommended mode, and of course the 3238default. With the Stylus Color, Epson introduced some new encoding 3239principles, namely "tiff" and "deltarow". While the first was omitted from 3240this driver for lack of apparent advantages, "<b><tt>deltarow</tt></b>" is 3241available as an option. "<b><tt>Softweave</tt></b>" cannot be used with 3242this encoding, so if <b><tt>OutputCode=deltarow</tt></b> is set, 3243<b><tt>Microweave</tt></b> becomes the default. Maybe that the size of the 3244ESC/P2 code becomes smaller, but I have never observed faster printing 3245speed. Things tend to become slower with <b><tt>deltarow</tt></b> compared 3246to <b><tt>Softweave</tt></b>. 3247 3248<h4><a name="STC_model"></a><b><tt>Model</tt></b></h4> 3249 3250<p> 3251Some ESC/P2 printers such as the Stylus 800 do not offer 3252<b><tt>Microweave</tt></b> or the commands required to do 3253<b><tt>Softweave</tt></b>. Setting <b><tt>Model</tt></b> just changes the 3254defaults and omits some parts of the initialization sequence which are not 3255compatible with the given printer model. Currently only 3256"<b><tt>st800</tt></b>" is supported besides the default 3257<b><tt>stcolor</tt></b>. 3258 3259<h3><a name="STC_Pitfalls"></a>Bugs and pitfalls</h3> 3260 3261<ul> 3262<li>The given <b><tt>?coding</tt></b> and <b><tt>?transfer</tt></b> arrays 3263should be strictly monotonic. 3264 3265<li>It is impossible to change <b><tt>WHITE</tt></b>: that's your paper. 3266Thus RGB transfer should end at 1.0 and CMYK transfer should start at 0.0. 3267 3268<li>Usually 8 bits per component yields fastest operation. 3269 3270<li>The <b><tt>ColorAdjustMatrix</tt></b> is not used in the reverse 3271transformation used when Ghostscript does the dithering 3272(<b><tt>gs</tt></b>* modes). Expect funny results. 3273 3274<li>If <b><tt>BitsPerPixel</tt></b> is less than 6, the entire coding and 3275transfer process does not work. This is always true for the 3276<b><tt>gs</tt></b>* modes and becomes true for the other modes if 3277<b><tt>BitsPerPixel</tt></b> is forced to low values. 3278 3279<li>720×720dpi printing should never select the <b><tt>gs</tt></b>* 3280modes and should always use <b><tt>stcolor.ps</tt></b>. (I prefer 3281360×720.) 3282</ul> 3283 3284<h3><a name="STC_Tests"></a>Tests</h3> 3285 3286<p> 3287This section gives an overview of performance in terms of processing and 3288printing times, from tests run after version 1.13. Printing was done 3289offline (simply copying a processed file to the printer) to measure real 3290printing speed without regard to speed of processing on the host, since at 3291high resolutions, processing time is the same order of magnitude and thus 3292may become the limiting factor. 3293 3294<h4><a name="STC_OutputCodes"></a>The various OutputCodes</h4> 3295 3296<p> 3297I ran several files though Ghostscript and recorded the size of the 3298resulting print code, the processing time, and the printing time, at least 3299for some of the files, always using these options: 3300 3301<blockquote><b><tt> 3302gs -sDEVICE=stcolor -sPAPERSIZE=a4 stcolor.ps - < file.ps 3303</tt></b></blockquote> 3304 3305<p> 3306(Actually "<b><tt>-sPAPERSIZE=a4</tt></b>" is in my 3307<b><tt>gs_init.ps</tt></b> since I'm a germ.) 3308 3309<p>"<b><tt>deltarow</tt></b>" is the new encoding principle 3310("<b><tt>ESC . 3 10 10 1</tt></b>") with 3311<b><tt>Microweave</tt></b> on. It is activated with 3312"<b><tt>-sOutputCode=deltarow</tt></b>". 3313 3314<p>"<b><tt>Softweave</tt></b>" actually means that nothing else was used: 3315it is the default, and implies that odd v=40/h=10/m=15 mode 3316("<b><tt>ESC . 1 40 10 15</tt></b>"). 3317 3318<p>"<b><tt>Microweave</tt></b>" means "<b><tt>-dMicroweave</tt></b>", 3319equivalent to "<b><tt>ESC . 1 10 10 1</tt></b>", 3320with full skip optimization and microweave activated. 3321 3322<p> 3323Finally I wanted to see the plain Kathy Ireland, and used 3324"<b><tt>-sOutputCode=plain</tt></b>", which just replaces runlength 3325encoding (RLE) by no encoding, thus using 3326"<b><tt>ESC . 0 40 10 15</tt></b>". [So sorry 3327<b><tt>;-)</tt></b> Kathy was still dressed in blue in front of the blue 3328sea on a blue air cushion -- nice to see but hard to dither.] 3329 3330<p> 3331So here are the results. 3332 3333<blockquote><table cellpadding=0 cellspacing=0> 3334<tr><th colspan=9 bgcolor="#CCCC00"><hr><font size="+1">File sizes and printing speeds with various weaving methods</font><hr> 3335<tr valign=bottom> 3336 <td> 3337 <td> 3338 <th><b><tt>golfer.ps</tt></b> 3339 <td> 3340 <th><b><tt>colorcir.ps</tt></b> 3341 <td> 3342 <th><b><tt>drawing.ps</tt></b> 3343 <td> 3344 <th><b><tt>brief.ps</tt></b> 3345<tr> <td colspan=9><hr> 3346<tr valign=top> <td><b><tt>deltarow</tt></b> 3347 <td> 3348 <td>572751/48.180u 3349 <td> 3350 <td>643374/41.690u 3351 <td> 3352 <td>90142/46.180u/1:50 3353 <td> 3354 <td>178563/49.350u/2:22 3355<tr valign=top> <td><b><tt>Softweave</tt></b> 3356 <td> 3357 <td>559593/46.810u 3358 <td> 3359 <td>669966/44.960u 3360 <td> 3361 <td>296168/48.160u/1:30 3362 <td> 3363 <td>269808/43.320u/1:55 3364<tr valign=top> <td><b><tt>Microweave</tt></b> 3365 <td> 3366 <td>590999/56.060u 3367 <td> 3368 <td>754276/42.890u 3369 <td> 3370 <td>338885/47.060u/1:50 3371 <td> 3372 <td>282314/44.690u/2:22 3373</table></blockquote> 3374 3375<blockquote><table cellpadding=0 cellspacing=0> 3376<tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Kathy Ireland</font><hr> 3377<tr valign=bottom> 3378 <td> 3379 <td> 3380 <th><b><tt>kathy.ps</tt></b> 3381<tr> <td colspan=3><hr> 3382<tr valign=top> <td><b><tt>deltarow</tt></b> 3383 <td> 3384 <td>3975334/111.940u/5:35 3385<tr valign=top> <td><b><tt>Softweave</tt></b> 3386 <td> 3387 <td>3897112/101.940u/3:10 3388<tr valign=top> <td><b><tt>Microweave</tt></b> 3389 <td> 3390 <td>4062829/100.990u/3:15 3391<tr valign=top> <td><b><tt>plain/soft</tt></b> 3392 <td> 3393 <td>5072255/104.390u/3:05 3394</table></blockquote> 3395 3396<p> 3397It may be that I've not chosen the optimal <b><tt>deltarow</tt></b> code, 3398but even if it saves at lot of bytes, printing-speed is not increased. 3399 3400<p> 3401At least the printer prefers plain Kathy. In other words, sending 1 3402Megabyte or 20% more data has no impact on printing speed. 3403<b><tt>drawing.ps</tt></b> is an exception to this rule: plain prints 3404slower than RLE. 3405 3406<p> 3407"Unclever" coding -- especially with <b><tt>deltarow</tt></b> -- can 3408significantly slow down printing. But even if very significant advantages 3409in the size of the code are achieved, "<b><tt>deltarow</tt></b>" is not 3410competitive. <b><tt>colorcir.ps</tt></b> shows savings with 3411<b><tt>deltarow</tt></b>, but printing is a mess. 3412 3413<h4><a name="STC_printing_time"></a>Printing time related to other options</h4> 3414 3415<p> 3416Full page halftone images printed, unless otherwise noted. 3417 3418<blockquote><table cellpadding=0 cellspacing=0> 3419<tr><th colspan=11 bgcolor="#CCCC00"><hr><font size="+1">Printing time related to other options</font><hr> 3420<tr valign=top> <th>dpi 3421 <td> 3422 <th colspan=3>Print mode 3423 <td> 3424 <th>Size KB 3425 <td> 3426 <th>Time 3427 <td> 3428 <th align=left>Comments 3429<tr> <td colspan=11><hr> 3430<tr valign=top> <td>180x180 3431 <td> 3432 <td>mono 3433 <td> 3434 <td align=right>-/uni 3435 <td> 3436 <td align=right>358 3437 <td> 3438 <td align=right>1:15 3439 <td> 3440 <td> 3441<tr valign=top> <td> 3442 <td> 3443 <td align=right> 3444 <td> 3445 <td align=right>-/bi 3446 <td> 3447 <td align=right>358 3448 <td> 3449 <td align=right>0:45 3450 <td> 3451 <td> 3452<tr valign=top> <td> 3453 <td> 3454 <td align=right> 3455 <td> 3456 <td align=right>micro/bi 3457 <td> 3458 <td align=right>205 3459 <td> 3460 <td align=right>0:45 3461 <td> 3462 <td>Not weaving 3463<tr valign=top> <td> 3464 <td> 3465 <td align=right> 3466 <td> 3467 <td align=right>soft/bi 3468 <td> 3469 <td align=right>179 3470 <td> 3471 <td align=right>1:25 3472 <td> 3473 <td> 3474<tr valign=top> <td> 3475 <td> 3476 <td>color 3477 <td> 3478 <td align=right>-/bi 3479 <td> 3480 <td align=right>641 3481 <td> 3482 <td align=right>2:45 3483 <td> 3484 <td> 3485<tr valign=top> <td> 3486 <td> 3487 <td align=right> 3488 <td> 3489 <td align=right>soft/bi 3490 <td> 3491 <td align=right>556 3492 <td> 3493 <td align=right>1:32 3494 <td> 3495 <td> 3496<tr valign=top> <td>360x360 3497 <td> 3498 <td>mono 3499 <td> 3500 <td align=right>-/uni 3501 <td> 3502 <td align=right>269 3503 <td> 3504 <td align=right>0:50 3505 <td> 3506 <td>Monochrome text 3507<tr valign=top> <td> 3508 <td> 3509 <td align=right> 3510 <td> 3511 <td align=right>-/bi 3512 <td> 3513 <td align=right>269 3514 <td> 3515 <td align=right>0:35 3516 <td> 3517 <td>Monochrome text 3518<tr valign=top> <td> 3519 <td> 3520 <td align=right> 3521 <td> 3522 <td align=right>micro/bi 3523 <td> 3524 <td align=right>269 3525 <td> 3526 <td align=right>2:25 3527 <td> 3528 <td>Monochrome text 3529<tr valign=top> <td> 3530 <td> 3531 <td align=right> 3532 <td> 3533 <td align=right>soft/uni 3534 <td> 3535 <td align=right>250 3536 <td> 3537 <td align=right>3:15 3538 <td> 3539 <td>Monochrome text 3540<tr valign=top> <td> 3541 <td> 3542 <td align=right> 3543 <td> 3544 <td align=right>soft/bi 3545 <td> 3546 <td align=right>250 3547 <td> 3548 <td align=right>1:55 3549 <td> 3550 <td>Monochrome text 3551<tr valign=top> <td> 3552 <td> 3553 <td>color 3554 <td> 3555 <td align=right>-/bi 3556 <td> 3557 <td align=right>346 3558 <td> 3559 <td align=right>1:00 3560 <td> 3561 <td>Sparse-color page, visible displacements 3562<tr valign=top> <td> 3563 <td> 3564 <td align=right> 3565 <td> 3566 <td align=right>micro/bi 3567 <td> 3568 <td align=right>346 3569 <td> 3570 <td align=right>1:50 3571 <td> 3572 <td>Sparse-color page, looks buggy -- printer? 3573<tr valign=top> <td> 3574 <td> 3575 <td align=right> 3576 <td> 3577 <td align=right>soft/bi 3578 <td> 3579 <td align=right>294 3580 <td> 3581 <td align=right>1:30 3582 <td> 3583 <td>Sparse-color page, O.K. 3584<tr valign=top> <td> 3585 <td> 3586 <td align=right> 3587 <td> 3588 <td align=right>-/bi 3589 <td> 3590 <td align=right>2218 3591 <td> 3592 <td align=right>2:45 3593 <td> 3594 <td>Visible stripes 3595<tr valign=top> <td> 3596 <td> 3597 <td align=right> 3598 <td> 3599 <td align=right>micro/bi 3600 <td> 3601 <td align=right>5171 3602 <td> 3603 <td align=right>3:17 3604 <td> 3605 <td> 3606<tr valign=top> <td> 3607 <td> 3608 <td align=right> 3609 <td> 3610 <td align=right>soft/bi 3611 <td> 3612 <td align=right>3675 3613 <td> 3614 <td align=right>3:05 3615 <td> 3616 <td> 3617<tr valign=top> <td>360x720 3618 <td> 3619 <td>mono 3620 <td> 3621 <td align=right>soft/bi 3622 <td> 3623 <td align=right>2761 3624 <td> 3625 <td align=right>5:40 3626 <td> 3627 <td> 3628<tr valign=top> <td> 3629 <td> 3630 <td>color 3631 <td> 3632 <td align=right>soft/bi 3633 <td> 3634 <td align=right>7789 3635 <td> 3636 <td align=right>6:15 3637 <td> 3638 <td>Just a small difference! 3639<tr valign=top> <td>720x360 3640 <td> 3641 <td>color 3642 <td> 3643 <td align=right>soft/bi 3644 <td> 3645 <td align=right>7182 3646 <td> 3647 <td align=right>5:40 3648 <td> 3649 <td> 3650<tr valign=top> <td>720x720 3651 <td> 3652 <td>color 3653 <td> 3654 <td align=right>micro/bi 3655 <td> 3656 <td align=right>14748 3657 <td> 3658 <td align=right>30:26 3659 <td> 3660 <td>Actually beyond printer's capabilities 3661<tr valign=top> <td> 3662 <td> 3663 <td align=right> 3664 <td> 3665 <td align=right>soft/bi 3666 <td> 3667 <td align=right>14407 3668 <td> 3669 <td align=right>11:08 3670 <td> 3671 <td> 3672</table></blockquote> 3673 3674<h3><a name="STC_acks"></a>Acknowledgments</h3> 3675 3676<p> 3677This driver was copied from <b><tt>gdevcdj.c</tt></b> (Ghostscript 3.12), 3678which was contributed by George Cameron, Koert Zeilstra, and Eckhard 3679Rueggeberg. Some of the ESC/P2 code was drawn from Richard Brown's 3680<b><tt>gdevescp.c</tt></b>. The POSIX interrupt code (compilation option 3681<b><tt>-DSTC_SIGNAL</tt></b>) is from Frederic Loyer. Several improvements 3682are based on discussions with Brian Converse, Bill Davidson, Gero Guenther, 3683Jason Patterson, ? Rueschstroer, and Steven Singer. 3684 3685<p> 3686While I wish to thank everyone mentioned above, they are by no means 3687responsible for bugs in the stcolor driver -- just for the features. 3688 3689<address> 3690Gunther Hess<br> 3691Richard Wagner Strasse 112<br> 3692D-47057 Duisburg<br> 3693Germany<br> 3694+49 203 376273 telephone (MET evening hours)<br> 3695<<a href="mailto:ghess@elmos.de">ghess@elmos.de</a>> 3696</address> 3697 3698<hr> 3699 3700<h2><a name="Uniprint"></a>uniprint, a flexible unified printer driver</h2> 3701 3702<p> 3703<b><tt>uniprint</tt></b> is a unified parametric driver by Gunther Hess 3704<<a href="mailto:ghess@elmos.de">ghess@elmos.de</a>> for several 3705kinds of printers and devices, including 3706 3707<blockquote> 3708<ul> 3709<li>any Epson Stylus Color, Stylus, or Stylus Pro 3710<li>HP PCL/RTL 3711<li>Canon BubbleJet Color 610 3712<li>NEC P2X 3713<li>Sun raster file format 3714</ul></blockquote> 3715 3716<p> 3717This driver is intended to <em>become</em> a unified printer driver. If you 3718consider it ugly, please send me your suggestions for improvements. The 3719driver will be updated with them. Thus the full explanation of the driver's 3720name is: 3721 3722<blockquote> 3723Ugly- -> Updated- -> Unified Printer Driver 3724</blockquote> 3725 3726<p> 3727But you probably want to know something about the functionality. 3728At the time of this writing uniprint drives: 3729 3730<ul> 3731<li>NEC Pinwriter P2X (24-pin monochrome impact printer, ESC/P style) 3732<li>Several Epson Stylus Color models (ESC/P2 style) 3733<li>HP-DeskJet 550c (basic HP-RTL) 3734<li>Canon BJC 610 3735</ul> 3736 3737<p> 3738It can be configured for various other printers without recompilation 3739and offers uncompressed (ugly) Sun rasterfiles as another format, but 3740this format is intended for testing purposes rather than real use. 3741The usage of this driver is quite simple. The typical command line looks 3742like this: 3743 3744<blockquote> 3745<b><tt>gs @</tt></b>{MODEL}<b><tt>.upp -sOutputFile=</tt></b>{printable file}<b><tt> MyFile.ps -c quit</tt></b> 3746</blockquote> 3747 3748<p> 3749For example, from my Linux box: 3750 3751<blockquote><b><tt> 3752gs @stc.upp -sOutputFile=/dev/lp1 tiger.eps -c quit 3753</tt></b></blockquote> 3754 3755<blockquote><table cellpadding=0 cellspacing=0> 3756<tr><th colspan=6 bgcolor="#CCCC00"><hr><font size="+1">Unified Printer Parameter files distributed with Ghostscript</font><hr> 3757<tr> <th align=left colspan=6>Canon BJC 610 (color, rendered) 3758<tr valign=top> <td> 3759 <td><b><tt>bjc610a0.upp</tt></b> 3760 <td> 3761 <td>360×360dpi 3762 <td> 3763 <td>plain paper, high speed 3764<tr valign=top> <td> 3765 <td><b><tt>bjc610a1.upp</tt></b> 3766 <td> 3767 <td>360×360dpi 3768 <td> 3769 <td>plain paper 3770<tr valign=top> <td> 3771 <td><b><tt>bjc610a2.upp</tt></b> 3772 <td> 3773 <td>360×360dpi 3774 <td> 3775 <td>coated paper 3776<tr valign=top> <td> 3777 <td><b><tt>bjc610a3.upp</tt></b> 3778 <td> 3779 <td>360×360dpi 3780 <td> 3781 <td>transparency film 3782<tr valign=top> <td> 3783 <td><b><tt>bjc610a4.upp</tt></b> 3784 <td> 3785 <td>360×360dpi 3786 <td> 3787 <td>back print film 3788<tr valign=top> <td> 3789 <td><b><tt>bjc610a5.upp</tt></b> 3790 <td> 3791 <td>360×360dpi 3792 <td> 3793 <td>fabric sheet 3794<tr valign=top> <td> 3795 <td><b><tt>bjc610a6.upp</tt></b> 3796 <td> 3797 <td>360×360dpi 3798 <td> 3799 <td>glossy paper 3800<tr valign=top> <td> 3801 <td><b><tt>bjc610a7.upp</tt></b> 3802 <td> 3803 <td>360×360dpi 3804 <td> 3805 <td>high gloss film 3806<tr valign=top> <td> 3807 <td><b><tt>bjc610a8.upp</tt></b> 3808 <td> 3809 <td>360×360dpi 3810 <td> 3811 <td>high resolution paper 3812<tr> <td> 3813<tr valign=top> <td> 3814 <td><b><tt>bjc610b1.upp</tt></b> 3815 <td> 3816 <td>720×720dpi 3817 <td> 3818 <td>plain paper 3819<tr valign=top> <td> 3820 <td><b><tt>bjc610b2.upp</tt></b> 3821 <td> 3822 <td>720×720dpi 3823 <td> 3824 <td>coated paper 3825<tr valign=top> <td> 3826 <td><b><tt>bjc610b3.upp</tt></b> 3827 <td> 3828 <td>720×720dpi 3829 <td> 3830 <td>transparency film 3831<tr valign=top> <td> 3832 <td><b><tt>bjc610b4.upp</tt></b> 3833 <td> 3834 <td>720×720dpi 3835 <td> 3836 <td>back print film 3837<tr valign=top> <td> 3838 <td><b><tt>bjc610b6.upp</tt></b> 3839 <td> 3840 <td>720×720dpi 3841 <td> 3842 <td>glossy paper 3843<tr valign=top> <td> 3844 <td><b><tt>bjc610b7.upp</tt></b> 3845 <td> 3846 <td>720×720dpi 3847 <td> 3848 <td>high-gloss paper 3849<tr valign=top> <td> 3850 <td><b><tt>bjc610b8.upp</tt></b> 3851 <td> 3852 <td>720×720dpi 3853 <td> 3854 <td>high resolution paper 3855<tr> <td> 3856<tr> <th align=left colspan=6>HP Ink-Printers 3857<tr valign=top> <td> 3858 <td><b><tt>cdj550.upp</tt></b> 3859 <td> 3860 <td>300×300dpi 3861 <td> 3862 <td>32-bit CMYK 3863<tr valign=top> <td> 3864 <td><b><tt>cdj690.upp</tt></b> 3865 <td> 3866 <td>300×300dpi 3867 <td> 3868 <td>Normal mode 3869<tr valign=top> <td> 3870 <td><b><tt>cdj690ec.upp</tt></b> 3871 <td> 3872 <td>300×300dpi 3873 <td> 3874 <td>Economy mode 3875<tr valign=top> <td> 3876 <td><b><tt>dnj750c.upp</tt></b> 3877 <td> 3878 <td>300×300dpi 3879 <td> 3880 <td>Color -- also good for 450C 3881<tr valign=top> <td> 3882 <td><b><tt>dnj750m.upp</tt></b> 3883 <td> 3884 <td>600×600dpi 3885 <td> 3886 <td>Monochrome 3887<tr> <td> 3888<tr> <th align=left colspan=6>NEC P2X 3889<tr valign=top> <td> 3890 <td><b><tt>necp2x.upp</tt></b> 3891 <td> 3892 <td>360×360dpi 3893 <td> 3894 <td>8-bit (Floyd-Steinberg) 3895<tr> <td> 3896<tr> <th align=left colspan=6>Any Epson Stylus Color 3897<tr valign=top> <td> 3898 <td><b><tt>stcany.upp</tt></b> 3899 <td> 3900 <td>360×360dpi 3901 <td> 3902 <td>4-bit, PostScript halftoning 3903<tr valign=top> <td> 3904 <td><b><tt>stcany_h.upp</tt></b> 3905 <td> 3906 <td>720×720dpi 3907 <td> 3908 <td>4-bit, PostScript halftoning 3909<tr> <td> 3910<tr> <th align=left colspan=6>Original Epson Stylus and Stylus Pro Color 3911<tr valign=top> <td> 3912 <td><b><tt>stc.upp</tt></b> 3913 <td> 3914 <td>360×360dpi 3915 <td> 3916 <td>32-bit CMYK, 15-pin 3917<tr valign=top> <td> 3918 <td><b><tt>stc_l.upp</tt></b> 3919 <td> 3920 <td>360×360dpi 3921 <td> 3922 <td>4-bit, PostScript halftoning, weaved noWeave 3923<tr valign=top> <td> 3924 <td><b><tt>stc_h.upp</tt></b> 3925 <td> 3926 <td>720×720dpi 3927 <td> 3928 <td>32-bit CMYK, 15-pin Weave 3929<tr> <td> 3930<tr> <th align=left colspan=6>Epson Stylus Color II 3931<tr valign=top> <td> 3932 <td><b><tt>stc2.upp</tt></b> 3933 <td> 3934 <td>360×360dpi 3935 <td> 3936 <td>32-bit CMYK, 20-pin, Epson Stylus Color II(s) 3937<tr valign=top> <td> 3938 <td><b><tt>stc2_h.upp</tt></b> 3939 <td> 3940 <td>720×720dpi 3941 <td> 3942 <td>32-bit CMYK, 20-pin, Epson Stylus Color II 3943<tr valign=top> <td> 3944 <td><b><tt>stc2s_h.upp</tt></b> 3945 <td> 3946 <td>720×720dpi 3947 <td> 3948 <td>32-bit CMYK, 20-pin, Epson Stylus Color IIs 3949<tr> <td> 3950<tr> <th align=left colspan=6>Epson Stylus Color 200 3951<tr valign=top> <td> 3952 <td><b><tt>stc200.upp</tt></b> 3953 <td> 3954 <td>360×720dpi 3955 <td> 3956 <td>Plain Paper 3957<tr> <td> 3958<tr> <th align=left colspan=6>Epson Stylus Color 300 3959<tr valign=top> <td> 3960 <td><b><tt>stc300.upp</tt></b> 3961 <td> 3962 <td>360×360dpi 3963 <td> 3964 <td>32-bit CMYK, plain paper 3965<tr valign=top> <td> 3966 <td><b><tt>stc300bl.upp</tt></b> 3967 <td> 3968 <td>180×180dpi 3969 <td> 3970 <td>black only, plain paper 3971<tr valign=top> <td> 3972 <td><b><tt>stc300bm.upp</tt></b> 3973 <td> 3974 <td>360×360dpi 3975 <td> 3976 <td>black only, plain paper 3977<tr> <td> 3978<tr> <th align=left colspan=6>Epson Stylus Color 500 (good transfer curves for plain paper) 3979<tr valign=top> <td> 3980 <td><b><tt>stc500p.upp</tt></b> 3981 <td> 3982 <td>360×360dpi 3983 <td> 3984 <td>32-bit CMYK, noWeave, plain paper 3985<tr valign=top> <td> 3986 <td><b><tt>stc500ph.upp</tt></b> 3987 <td> 3988 <td>720×720dpi 3989 <td> 3990 <td>32-bit CMYK, noWeave, plain paper 3991<tr> <td> 3992<tr> <th align=left colspan=6>Epson Stylus Color 600, 32/90-inch weaving 3993<tr valign=top> <td> 3994 <td><b><tt>stc600pl.upp</tt></b> 3995 <td> 3996 <td>360×360dpi 3997 <td> 3998 <td>32-bit CMYK, 32-pin, plain paper 3999<tr valign=top> <td> 4000 <td><b><tt>stc600p.upp</tt></b> 4001 <td> 4002 <td>720×720dpi 4003 <td> 4004 <td>32-bit CMYK, 32-pin, plain paper 4005<tr valign=top> <td> 4006 <td><b><tt>stc600ih.upp</tt></b> 4007 <td> 4008 <td>1440×720dpi 4009 <td> 4010 <td>32-bit CMYK, 30-pin, inkjet paper 4011<tr> <td> 4012<tr> <th align=left colspan=6>Epson Stylus Color 640 4013<tr valign=top> <td> 4014 <td><b><tt>stc640p.upp</tt></b> 4015 <td> 4016 <td>720×720dpi 4017 <td> 4018 <td>plain paper? 4019 4020 4021 4022<tr valign=top> <td> 4023 <td><b><tt>st640p.upp</tt></b> 4024 <td> 4025 <td>720×720dpi 4026 <td> 4027 <td>CMYK, plain paper 4028<tr valign=top> <td> 4029 <td><b><tt>st640pg.upp</tt></b> 4030 <td> 4031 <td>720×720dpi 4032 <td> 4033 <td>grayscale, plain paper 4034<tr valign=top> <td> 4035 <td><b><tt>st640pl.upp</tt></b> 4036 <td> 4037 <td>360×360dpi 4038 <td> 4039 <td>CMYK, plain paper 4040<tr valign=top> <td> 4041 <td><b><tt>st640plg.upp</tt></b> 4042 <td> 4043 <td>360×360dpi 4044 <td> 4045 <td>grayscale, plain paper 4046<tr valign=top> <td> 4047 <td><b><tt>st640ih.upp</tt></b> 4048 <td> 4049 <td>1440×720dpi 4050 <td> 4051 <td>CMYK, inkjet paper 4052<tr valign=top> <td> 4053 <td><b><tt>st640ihg.upp</tt></b> 4054 <td> 4055 <td>1440×720dpi 4056 <td> 4057 <td>grayscale, inkjet paper 4058 4059 4060 4061 4062 4063 4064<tr> <td> 4065<tr> <th align=left colspan=6>Epson Stylus Color 800, 64/180-inch weaving 4066<tr valign=top> <td> 4067 <td><b><tt>stc800pl.upp</tt></b> 4068 <td> 4069 <td>360×360dpi 4070 <td> 4071 <td>32-bit CMYK, 64-pin, plain paper 4072<tr valign=top> <td> 4073 <td><b><tt>stc800p.upp</tt></b> 4074 <td> 4075 <td>720×720dpi 4076 <td> 4077 <td>32-bit CMYK, 64-pin, plain paper 4078<tr valign=top> <td> 4079 <td><b><tt>stc800ih.upp</tt></b> 4080 <td> 4081 <td>1440×720dpi 4082 <td> 4083 <td>32-bit CMYK, 62-pin, inkjet paper 4084<tr valign=top> <td> 4085 <td><b><tt>stc1520.upp</tt></b> 4086 <td> 4087 <td>1440×720dpi 4088 <td> 4089 <td>32-bit CMYK, 62-pin, inkjet paper 4090<tr> <td> 4091<tr> <th align=left colspan=6>Sun raster file 4092<tr valign=top> <td> 4093 <td><b><tt>ras1.upp</tt></b> 4094 <td> 4095 <td>1-bit 4096 <td> 4097 <td>monochrome (Ghostscript) 4098<tr valign=top> <td> 4099 <td><b><tt>ras3.upp</tt></b> 4100 <td> 4101 <td>3-bit 4102 <td> 4103 <td>RGB (Ghostscript) 4104<tr valign=top> <td> 4105 <td><b><tt>ras4.upp</tt></b> 4106 <td> 4107 <td>4-bit 4108 <td> 4109 <td>CMYK (Ghostscript) 4110<tr valign=top> <td> 4111 <td><b><tt>ras8m.upp</tt></b> 4112 <td> 4113 <td>8-bit 4114 <td> 4115 <td>grayscale (Floyd-Steinberg) 4116<tr valign=top> <td> 4117 <td><b><tt>ras24.upp</tt></b> 4118 <td> 4119 <td>24-bit 4120 <td> 4121 <td>RGB (Floyd-Steinberg) 4122<tr valign=top> <td> 4123 <td><b><tt>ras32.upp</tt></b> 4124 <td> 4125 <td>32-bit 4126 <td> 4127 <td>CMYK (CMYK-Floyd-Steinberg) 4128</table></blockquote> 4129 4130<p> 4131Thanks to Danilo Beuche, Guido Classen, Mark Goldberg and Hans-Heinrich 4132Viehmann for providing the files for the stc200, hp690, stc500 and the 4133stc640. Thanks to Michael Lossin <losse@germanymail.com> for the 4134newer st640 parameter sets. 4135 4136<p> 4137Please note the following: 4138 4139<blockquote><ul> 4140<li>Changing the resolution with Ghostscript's 4141<a href="Use.htm#Resolution_switch"><b><tt>-r</tt></b> switch</a> is 4142usually not possible. 4143<li>For Epson Stylus Color models not listed above, the two 4144<b><tt>stc500</tt></b> variants are likely to work in addition to 4145<b><tt>stcany</tt></b>, but their gamma correction might be wrong. 4146</ul></blockquote> 4147 4148<h3><a name="Uni_state"></a>The state of this driver</h3> 4149 4150<p> 4151The coding of <b><tt>uniprint</tt></b> was triggered by the requirements of 4152the various Stylus Color models and some personal needs for HP and NEC 4153drivers. Thus the Epson models are well represented among the distributed 4154parameter files. When this driver entered the beta test phase, three other 4155drivers appreared on the scene that could be at least partially integrated 4156into <b><tt>uniprint</tt></b>: <b><tt>cdj850</tt></b> by Uli Wortmann 4157(available at <a href="http://www.erdw.ethz.ch/~bonk/hp850/hp850.html">http://www.erdw.ethz.ch/~bonk/hp850/hp850.html</a>), 4158<b><tt>hpdj</tt></b> by Martin Lottermoser, and <b><tt>bjc610</tt></b> by 4159Helmut Riegler. 4160 4161<p> 4162Uli addresses features of the more recent DeskJet models that will not be 4163available in <b><tt>uniprint</tt></b> soon. Martin taught me a lesson on 4164HP-PCL3 headers that will be available in <b><tt>uniprint</tt></b> 4165soon. Helmut in turn followed an almost similar idea, but targetted 4166primarily for printing on Canon printers from the pbmplus library. Starting 4167with version 1.68 of uniprint, BJC support is available. Work on the 4168<b><tt>hpdj</tt></b> integration will start after the update of my website. 4169 4170<h3><a name="Uni_background"></a>Notes on <b><tt>uniprint</tt></b>'s background</h3> 4171 4172<p> 4173<b><tt>uniprint</tt></b> is actually an update of <b><tt>stcolor</tt></b>, 4174but much more versatile than its predecessor; <b><tt>stcolor</tt></b>, in 4175its turn, started as a clone of the color DeskJet family of drivers 4176(<b><tt>cdj</tt></b>*). Finally, <b><tt>cdj</tt></b>* can be considered an 4177addition of features to the simpler monochrome drivers of Ghostscript. This 4178addition of features is useful to get an idea of the functionality of 4179<b><tt>uniprint</tt></b>: 4180 4181<blockquote> 4182<dl> 4183<dt>Monochrome to advanced color (<b><tt>cdj</tt></b>*): 4184<dd>This adds color mapping and rendering functions to the driver. 4185Error diffusion is especially important for the quality of printing. 4186</dl> 4187 4188<dl> 4189<dt>HP color to Epson Color (<b><tt>stcolor</tt></b>) 4190<dd>The Epson Stylus Color offered two features simultaneously: it could 4191produce 720×720dpi output and it could soak the paper. In other 4192words, it required more color management features inside the driver. This 4193is still the major conceptual difference in the data generation for HP and 4194Epson printers. 4195</dl> 4196 4197<dl> 4198<dt>Weaving techniques (<b><tt>stcolor</tt></b>) 4199<dd>Besides the internal color management, the Stylus Color did not provide 4200enough buffer space to operate the printer fast at 720×720dpi. The 4201use of weaving could yield triple the print speed. Weaving, also called 4202interleaving, is present in some monochrome drivers too. The new thing in 4203<b><tt>stcolor</tt></b> was the combination with error diffusion. 4204Unfortunately the weaving was somehow hard-coded, as the problems with the 4205newer members of the Stylus Color family of printers demonstrated. 4206</dl> 4207 4208<dl> 4209<dt>Generalized output format and weaving (<b><tt>uniprint</tt></b>) 4210<dd>The features mentioned above yield about 90% of 4211<b><tt>stcolor</tt></b>'s source code; only 10% is related to the 4212formatting of the output. The idea to make the output format switchable 4213came up soon after completing <b><tt>stcolor</tt></b>, but its final design 4214was triggered by the (personal) necessity to drive a NEC P2X and a 4215Designjet 750c. 4216</dl></blockquote> 4217 4218<p> 4219Thus <b><tt>uniprint</tt></b> accumulates almost any features that can be 4220found among the other printer drivers, which clearly has some disadvantage 4221in processing speed -- true in particular of version 1.75, since it was 4222targetted for functionality, and several speed-gaining features were 4223(knowingly) omitted. 4224 4225<p> 4226To summarize and to introduce the terms used in the description of the 4227parameters, the features of <b><tt>uniprint</tt></b> that can be 4228parameterized are: 4229 4230<blockquote><ul> 4231<li>color mapping, 4232<li>color rendering (error diffusion or Floyd-Steinberg), 4233<li>output format, including 4234<li>weaving. 4235</ul></blockquote> 4236 4237<h3><a name="Uni_make_pfile"></a>Godzilla's guide to the creation of Unified Printer Parameter (<b><tt>.upp</tt></b>) files</h3> 4238 4239<p> 4240Here is one of the distributed parameter files (<b><tt>stc_l.upp</tt></b>) 4241with some added comments. Also see the section that describes 4242<a href="#Uni_all_parameters">all <b><tt>uniprint</tt></b>'s parameters in 4243brief</a>. 4244 4245<pre> 4246-supModel="Epson Stylus Color I (and PRO Series), 360x360DpI, noWeave" 4247-sDEVICE=uniprint -- Select the driver 4248-dNOPAUSE -- Useful with printers 4249-dSAFER -- Provides some security 4250-dupColorModel=/DeviceCMYK -- Selects the color mapping 4251-dupRendering=/ErrorDiffusion -- Selects the color rendering 4252-dupOutputFormat=/EscP2 -- Selects the output format 4253-r360x360 -- Adjusts the resolution 4254-dupMargins="{ 9.0 39.96 9.0 9.0}" -- Establishes (L/B/R/T margins in points) 4255-dupComponentBits="{1 1 1 1}" -- Map: bits per component (default: 8) 4256-dupWeaveYPasses=4 -- Weave: Y-passes (default: 1) 4257-dupOutputPins=15 -- Format/weave: scans per Command 4258-dupBeginPageCommand="< -- Goes to the printer 4259 1b40 1b40 -- ESC '@' ESC '@' -> dual reset 4260 1b2847 0100 01 -- ESC '(' 'G' 1 0 1 -> graphics 4261 1b2869 0100 00 -- ESC '(' 'i' 1 0 1 -> no HW weave 4262 1b2855 0100 0A -- ESC '(' 'U' 1 0 10 -> 360dpi 4263 1b5500 -- ESC 'U' 0 -> bidir print 4264 1b2843 0200 0000 -- ESC '(' 'C' 2 0 xx -> page length 4265 1b2863 0400 0000 0000 -- ESC '(' 'c' 4 0 xxxx -> margins 4266>" -- as it is, unless: 4267-dupAdjustPageLengthCommand -- Adjust page length in BOP requested 4268-dupAdjustTopMarginCommand -- Adjust top margin in BOP 4269-dupAdjustBottomMarginCommand -- Adjust bottom margin in BOP 4270-dupEndPageCommand="(\033@\014)" -- Last (but one) data to the printer 4271-dupAbortCommand="(\033@\15\12\12\12\12 Printout-Aborted\15\014)" 4272</pre> 4273 4274<p> 4275That's short, and if one removes <b><tt>upWeaveYPasses</tt></b> and 4276<b><tt>upOutputPins</tt></b> it becomes shorter, almost 4277<b><tt>stcany.upp</tt></b>. This miniature size is because I am most 4278familiar with ESC/P2, and was able to add defaults for the omitted 4279parameters. Now a few notes about the parameters used in this example: 4280 4281<ul> 4282<li><b><tt>upModel</tt></b> is a string serving as a comment (and nothing else). 4283 4284<li><a href="Use.htm#Output_device"><b><tt>DEVICE</tt></b></a>, 4285<a href="Use.htm#NoPause"><b><tt>NOPAUSE</tt></b></a>, <a 4286href="Use.htm#Safer"><b><tt>SAFER</tt></b></a> are well-known Ghostscript 4287parameters described in the <a href="Use.htm">usage documentation</a>. 4288 4289<li><b><tt>upColorModel</tt></b> is one of major <b><tt>uniprint</tt></b> 4290parameters: it selects the color mapping and in turn the PostScript color 4291model. It supports the devices <b><tt>/DeviceGray</tt></b>, <b><tt>/DeviceRGBW</tt></b>, <b><tt>/DeviceRGB</tt></b>, <b><tt>/DeviceCMYK</tt></b>, and <b><tt>/DeviceCMYKgenerate</tt></b>. 4292 4293<li><b><tt>upRendering</tt></b> selects the (color) rendering, supporting 4294the values <b><tt>/ErrorDiffusion</tt></b> and <b><tt>/FSCMYK32</tt></b>. 4295<b><tt>/ErrorDiffusion</tt></b> is similar to <b><tt>fsmono</tt></b>, 4296<b><tt>fsrgb</tt></b> and <b><tt>fsx4</tt></b> of <b><tt>stcolor</tt></b>, 4297while <b><tt>/FSCMYK32</tt></b> is (almost) identical to 4298<b><tt>fscmyk</tt></b> and <b><tt>hscmyk</tt></b>, but is restricted to 429932-bit data and should be used in conjunction with 4300<b><tt>/DeviceCMYKgenerate</tt></b>. 4301 4302<li><b><tt>upOutputFormat</tt></b> selects the output method, supporting the values 4303<b><tt>/SunRaster</tt></b>, <b><tt>/Epson</tt></b>, <b><tt>/EscP2</tt></b>, <b><tt>/EscP2XY</tt></b>, and<b><tt>/Pcl</tt></b>. 4304 4305<blockquote><table cellpadding=0 cellspacing=0> 4306<tr valign=top> <td><b><tt>/SunRaster</tt></b> 4307 <td> 4308 <td>creates Sun raster files and requires no other parameters 4309<tr valign=top> <td><b><tt>/Epson</tt></b> 4310 <td> 4311 <td>is used for the elderly ESC/P format (used by many printers) 4312<tr valign=top> <td><b><tt>/EscP2</tt></b> 4313 <td> 4314 <td>is used by more recent Epson printers (no X weaving supported) 4315<tr valign=top> <td><b><tt>/EscP2XY</tt></b> 4316 <td> 4317 <td>supports X-Weaving, used with 1440dpi printers and in <b><tt>stc2s_h</tt></b> 4318<tr valign=top> <td><b><tt>/Pcl</tt></b> 4319 <td> 4320 <td>HP PCL/RTL-style output formatter without weaving 4321</table></blockquote> 4322 4323<li><b><tt>-r360x360</tt></b> is Ghostscript's standard 4324<a href="Use.htm#Resolution_switch">resolution switch</a>. 4325 4326<li><b><tt>upMargins="{ 9.0 39.96 9.0 9.0}"</tt></b> 4327has function similar to the Ghostscript parameter 4328<b><tt>.HWMargins</tt></b>: it sets the left, bottom, right, and top 4329margins in points. <b><tt>uniprint</tt></b> provides this parameter to 4330enable automatic left-right exchange if <b><tt>upYFlip</tt></b> is active. 4331 4332<li><b><tt>upComponentBits</tt></b> is an array of integers that selects 4333the bits stored in raster memory, by default 8 bits per component. In this 4334example, 1 bit is selected for each component, thus turning down the 4335Floyd-Steinberg algorithm (but still carrying out the time-consuming 4336computation). The related parameter "<b><tt>upComponentShift</tt></b>" 4337controls positioning the components within raster memory. Each of the 4338numbers given corresponds to a component which depends on the selected 4339"<b><tt>upColorModel</tt></b>": 4340 4341<blockquote><table cellpadding=0 cellspacing=0> 4342<tr valign=top> <td align=center> 4343 <td> 4344 <td align=center><b><tt>/DeviceGray</tt></b> 4345 <td> 4346 <td align=center><b><tt>/DeviceRGBW</tt></b> 4347 <td> 4348 <td align=center><b><tt>/DeviceRGB</tt></b> 4349 <td> 4350 <td align=center><b><tt>/DeviceCMYK</tt></b> 4351 <td> 4352 <td align=center><b><tt>/DeviceCMYKgenerate</tt></b> 4353<tr> <td colspan=11><hr> 4354<tr valign=top> <td align=center>0 4355 <td> 4356 <td align=center>White 4357 <td> 4358 <td align=center>White 4359 <td> 4360 <td align=center>Red 4361 <td> 4362 <td align=center>Black 4363 <td> 4364 <td align=center>Black 4365<tr valign=top> <td align=center>1 4366 <td> 4367 <td align=center>-- 4368 <td> 4369 <td align=center>Red 4370 <td> 4371 <td align=center>Green 4372 <td> 4373 <td align=center>Cyan 4374 <td> 4375 <td align=center>Cyan 4376<tr valign=top> <td align=center>2 4377 <td> 4378 <td align=center>-- 4379 <td> 4380 <td align=center>Green 4381 <td> 4382 <td align=center>Blue 4383 <td> 4384 <td align=center>Magenta 4385 <td> 4386 <td align=center>Magenta 4387<tr valign=top> <td align=center>3 4388 <td> 4389 <td align=center>-- 4390 <td> 4391 <td align=center>Blue 4392 <td> 4393 <td align=center>-- 4394 <td> 4395 <td align=center>Yellow 4396 <td> 4397 <td align=center>Yellow 4398</table> 4399 4400<p> 4401This order may not be suitable for some printers, so another parameter 4402"<b><tt>upOutputComponentOrder</tt></b>", also an array of integers, 4403selects the output order using the numbers on the left. 4404</blockquote> 4405 4406<p> 4407One group of very important parameters not used in the example above 4408deserves to be mentioned here: the transfer arrays, named 4409"<b><tt>up</tt><em>{color}</em><tt>Transfer</tt></b>", where 4410<b><em>{color}</em></b> is one of the names in the table above. These are 4411arrays of floats in the range 0.0 - 1.0 representing the color transfer 4412functions. They are used during mapping and rendering. In the simplest 4413case, these arrays ensure an equidistant distribution of the stored values 4414within the device space (which means a nonlinear mapping from Ghostscript's 4415point of view). If the given array does not cover the entire range from 0 4416to 1, which applies for the Stylus Color family at high resolution for some 4417media, only the relevant part gets mapped to raster memory (meaning that 4418is's fully utilized) and the rendering takes care of the "overhang" (in 4419this case the post-diffusion of 1-bit components makes sense). 4420 4421<p> 4422Finally an important note on the transfer arrays: for monochrome devices 4423the stored component is <b><tt>White</tt></b>, which is the way PostScript 4424defines these devices, but most printers require <b><tt>Black</tt></b>. 4425Thus one has to provide a falling "<b><tt>upWhiteTransfer</tt></b>" for 4426such printers. 4427 4428<li><b><tt>upWeaveYPasses</tt></b> is an integer that gives the number of 4429print head passes required to achieve the requested Ydpi. This makes sense 4430only if 4431 4432<li><b><tt>upOutputPins</tt></b> is set to something greater than 1. Thus 4433multiple pins or nozzles are transferred with a single command, and of 4434course such a command must be supported by the device. 4435 4436</ul> 4437 4438<p> 4439If no other weave parameters are given, <b><tt>uniprint</tt></b> computes 4440several defaults which together do no weaving. The <b><tt>/Epson</tt></b> 4441and <b><tt>/EscP2XY</tt></b> formats take care of 4442"<b><tt>upWeaveXPasses</tt></b>" too. 4443 4444<ul> 4445 4446<li><b><tt>upBeginPageCommand</tt></b> represents the data transferred to 4447the printer whenever a new page begins. Before that, 4448"<b><tt>upBeginJobCommand</tt></b>" is written to the device only once per 4449output file. (Intended for the HP PJL sequences). 4450 4451<li><b><tt>upAdjustBottomMarginCommand</tt></b>, 4452<b><tt>upAdjustMediaSize</tt></b>, 4453<b><tt>upAdjustPageLengthCommand</tt></b>, 4454<b><tt>upAdjustPageWidthCommand</tt></b>, 4455<b><tt>upAdjustResolutionCommand</tt></b>, and 4456<b><tt>upAdjustTopMarginCommand</tt></b> 4457 4458<p> 4459Normally <b><tt>uniprint</tt></b> does not change the 4460"<b><tt>upBeginPageCommand</tt></b>", nor does it provide a default. 4461However, if the above boolean values are set, the corresponding values are 4462changed (provided that the code of the formatters supports this change and 4463the commands to be adjusted are included in the BOP string). 4464 4465<li><b><tt>upEndPageCommand</tt></b> is the fixed termination sequence for 4466each page, and of course there is an "<b><tt>upEndJobCommand</tt></b>" too. 4467 4468<li><b><tt>upAbortCommand</tt></b> is written if <b><tt>uniprint</tt></b>'s 4469interrupt detection is enabled and a signal is caught. It replaces 4470"<b><tt>upEndPageCommand</tt></b>" and "<b><tt>upEndJobCommand</tt></b>", 4471thus allowing the indication of an aborted job. (Ghostscript gets an error 4472return from <b><tt>uniprint</tt></b> in this case, and abandons further 4473processing.) 4474 4475</ul> 4476 4477<p> 4478For the ESC/P(2) formats all commands represent binary data, while for 4479the PCL/RTL formatter some of them are formats for <b><tt>fprintf</tt></b>. These strings 4480<b><em>must</em></b> explicitly have a trailing "\0'. 4481 4482<p> 4483I should write more, but the only recommendation is to 4484take a look at the various parameter files. Here are a few more hints. 4485 4486<ul> 4487<li>If the Driver rejects a configuration, nothing happens until 4488<b><tt>showpage</tt></b>; then an error is raised and a message with 4489"CALL-REJECTED upd_print_page..." is printed on stderr. 4490 4491<li><b><tt>uniprint</tt></b> has lots of messages that can be activated by 4492setting bits in the preprocessor macro <b><tt>UPD_MESSAGES</tt></b>. I 4493usually use the compile-time option <b><tt>-DUPD_MESSAGES=0x17</tt></b> for 4494configuration development. (For the semantics, check the 4495<b><tt>UPD_M_</tt></b> macros in the source.) 4496 4497<li>A program "<b><tt>uninfo.ps</tt></b>" distributed with Ghostscript 4498displays interactively in alphabetical order the contents of the current 4499pagedevice dictionary. This includes any parameters generated or changed by 4500<b><tt>uniprint</tt></b>. 4501</ul> 4502 4503<h3><a name="Uni_all_parameters"></a>All parameters in brief</h3> 4504 4505<p> 4506This table gives a brief explanation of every parameter known to 4507<b><tt>uniprint</tt></b>, listing them in alphabetical order. "[ ]" 4508denotes that a parameter is an array, and "(RO)" that it is read-only. 4509 4510<blockquote><table cellpadding=0 cellspacing=0> 4511<tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">All <b><tt>uniprint</tt></b> parameters</font><hr> 4512<tr valign=bottom> 4513 <th align=left>Parameter 4514 <td> 4515 <th align=left>Type 4516 <td> 4517 <th align=left>Use 4518<tr> <td colspan=5><hr> 4519<tr valign=top> <td><b><tt>upAbortCommand</tt></b> 4520 <td> 4521 <td>String 4522 <td> 4523 <td>End of page and file on interrupt 4524<tr valign=top> <td><b><tt>upAdjustBottomMarginCommand</tt></b> 4525 <td> 4526 <td>Bool 4527 <td> 4528 <td>Manipulate bottom margin in <b><tt>upBeginPageCommand</tt></b> 4529<tr valign=top> <td><b><tt>upAdjustMediaSizeCommand</tt></b> 4530 <td> 4531 <td>Bool 4532 <td> 4533 <td>Manipulate <b><tt>Mediasize</tt></b> [intended] 4534<tr valign=top> <td><b><tt>upAdjustPageLengthCommand</tt></b> 4535 <td> 4536 <td>Bool 4537 <td> 4538 <td>Manipulate page length in <b><tt>upBeginPageCommand</tt></b> 4539<tr valign=top> <td><b><tt>upAdjustPageWidthCommand</tt></b> 4540 <td> 4541 <td>Bool 4542 <td> 4543 <td>Manipulate page width in <b><tt>upBeginPageCommand</tt></b> 4544<tr valign=top> <td><b><tt>upAdjustResolutionCommand</tt></b> 4545 <td> 4546 <td>Bool 4547 <td> 4548 <td>Manipulate resolution 4549<tr valign=top> <td><b><tt>upAdjustTopMarginCommand</tt></b> 4550 <td> 4551 <td>Bool 4552 <td> 4553 <td>Manipulate top margin in <b><tt>upBeginPageCommand</tt></b> 4554<tr valign=top> <td><b><tt>upBeginJobCommand</tt></b> 4555 <td> 4556 <td>String 4557 <td> 4558 <td>Begin each output file 4559<tr valign=top> <td><b><tt>upBeginPageCommand</tt></b> 4560 <td> 4561 <td>String 4562 <td> 4563 <td>Begin each page 4564<tr valign=top> <td><b><tt>upBlackTransfer</tt></b> 4565 <td> 4566 <td>Float[ ] 4567 <td> 4568 <td>Black transfer (CMYK only!) 4569<tr valign=top> <td><b><tt>upBlueTransfer</tt></b> 4570 <td> 4571 <td>Float[ ] 4572 <td> 4573 <td>Blue transfer 4574<tr valign=top> <td><b><tt>upColorInfo</tt></b> 4575 <td> 4576 <td>Int[ ] 4577 <td> 4578 <td>struct <b><tt>gx_device_color_info</tt></b> 4579<tr valign=top> <td><b><tt>upColorModel</tt></b> 4580 <td> 4581 <td>Name 4582 <td> 4583 <td>Select color mapping 4584<tr valign=top> <td><b><tt>upColorModelInitialized</tt></b> 4585 <td> 4586 <td>Bool (RO) 4587 <td> 4588 <td>Color mapping OK 4589<tr valign=top> <td><b><tt>upComponentBits</tt></b> 4590 <td> 4591 <td>Int[ ] 4592 <td> 4593 <td>Bits stored per component 4594<tr valign=top> <td><b><tt>upComponentShift</tt></b> 4595 <td> 4596 <td>Int[ ] 4597 <td> 4598 <td>Positioning within <b><tt>gx_color_index</tt></b> 4599<tr valign=top> <td><b><tt>upCyanTransfer</tt></b> 4600 <td> 4601 <td>Float[ ] 4602 <td> 4603 <td>Cyan transfer 4604<tr valign=top> <td><b><tt>upEndJobCommand</tt></b> 4605 <td> 4606 <td>String 4607 <td> 4608 <td>End each file unless <b><tt>upAbortCommand</tt></b> 4609<tr valign=top> <td><b><tt>upEndPageCommand</tt></b> 4610 <td> 4611 <td>String 4612 <td> 4613 <td>End each page unless <b><tt>upAbortCommand</tt></b> 4614<tr valign=top> <td><b><tt>upErrorDetected</tt></b> 4615 <td> 4616 <td>Bool (RO) 4617 <td> 4618 <td>Severe (VM) error, not fully operational 4619<tr valign=top> <td><b><tt>upFSFixedDirection</tt></b> 4620 <td> 4621 <td>Bool 4622 <td> 4623 <td>Inhbits direction toggling in rendering 4624<tr valign=top> <td><b><tt>upFSProcessWhiteSpace</tt></b> 4625 <td> 4626 <td>Bool 4627 <td> 4628 <td>Causes white-space rendering 4629<tr valign=top> <td><b><tt>upFSReverseDirection</tt></b> 4630 <td> 4631 <td>Bool 4632 <td> 4633 <td>Run rendering in reverse (if fixed) 4634<tr valign=top> <td><b><tt>upFSZeroInit</tt></b> 4635 <td> 4636 <td>Bool 4637 <td> 4638 <td>Non-random rendering initialization 4639<tr valign=top> <td><b><tt>upFormatXabsolute</tt></b> 4640 <td> 4641 <td>Bool 4642 <td> 4643 <td>Write absolute X coordinates 4644<tr valign=top> <td><b><tt>upFormatYabsolute</tt></b> 4645 <td> 4646 <td>Bool 4647 <td> 4648 <td>Write absolute Y coordinates 4649<tr valign=top> <td><b><tt>upGreenTransfer</tt></b> 4650 <td> 4651 <td>Float[ ] 4652 <td> 4653 <td>Green transfer 4654<tr valign=top> <td><b><tt>upMagentaTransfer</tt></b> 4655 <td> 4656 <td>Float[ ] 4657 <td> 4658 <td>Magenta transfer 4659<tr valign=top> <td><b><tt>upMargins</tt></b> 4660 <td> 4661 <td>Float[ ] 4662 <td> 4663 <td>L/B/R/T margins in points 4664<tr valign=top> <td><b><tt>upModel</tt></b> 4665 <td> 4666 <td>String 4667 <td> 4668 <td>Comment string, holds some info 4669<tr valign=top> <td><b><tt>upOutputAborted</tt></b> 4670 <td> 4671 <td>Bool (RO) 4672 <td> 4673 <td>Caught an interrupt 4674<tr valign=top> <td><b><tt>upOutputBuffers</tt></b> 4675 <td> 4676 <td>Int 4677 <td> 4678 <td>Number of rendering buffers (2^<small><sup><b>N</b></sup></small>) 4679<tr valign=top> <td><b><tt>upOutputComponentOrder</tt></b> 4680 <td> 4681 <td>Int[ ] 4682 <td> 4683 <td>Order of components when printing 4684<tr valign=top> <td><b><tt>upOutputComponents</tt></b> 4685 <td> 4686 <td>Int 4687 <td> 4688 <td>Number of written components, not fully operational 4689<tr valign=top> <td><b><tt>upOutputFormat</tt></b> 4690 <td> 4691 <td>Name 4692 <td> 4693 <td>Select output format 4694<tr valign=top> <td><b><tt>upOutputFormatInitialized</tt></b> 4695 <td> 4696 <td>Bool (RO) 4697 <td> 4698 <td>Format data OK 4699<tr valign=top> <td><b><tt>upOutputHeight</tt></b> 4700 <td> 4701 <td>Int 4702 <td> 4703 <td>Output height in pixels 4704<tr valign=top> <td><b><tt>upOutputPins</tt></b> 4705 <td> 4706 <td>Int 4707 <td> 4708 <td>Number of pins / nozzles per command 4709<tr valign=top> <td><b><tt>upOutputWidth</tt></b> 4710 <td> 4711 <td>Int 4712 <td> 4713 <td>Output width in pixels 4714<tr valign=top> <td><b><tt>upOutputXOffset</tt></b> 4715 <td> 4716 <td>Int 4717 <td> 4718 <td>Offset in pixels, if <b><tt>upFormatXabsolute</tt></b> 4719<tr valign=top> <td><b><tt>upOutputXStep</tt></b> 4720 <td> 4721 <td>Int 4722 <td> 4723 <td>Divisor or multiplier for X coords 4724<tr valign=top> <td><b><tt>upOutputYOffset</tt></b> 4725 <td> 4726 <td>Int 4727 <td> 4728 <td>Offset in pixels, if <b><tt>upFormatYabsolute</tt></b> 4729<tr valign=top> <td><b><tt>upOutputYStep</tt></b> 4730 <td> 4731 <td>Int 4732 <td> 4733 <td>Divisor or multiplier for Y coords 4734<tr valign=top> <td><b><tt>upRasterBufferInitialized</tt></b> 4735 <td> 4736 <td>Bool (RO) 4737 <td> 4738 <td>GS buffer OK 4739<tr valign=top> <td><b><tt>upRedTransfer</tt></b> 4740 <td> 4741 <td>Float[ ] 4742 <td> 4743 <td>Red transfer 4744<tr valign=top> <td><b><tt>upRendering</tt></b> 4745 <td> 4746 <td>Name 4747 <td> 4748 <td>Select rendering algorithm 4749<tr valign=top> <td><b><tt>upRenderingInitialized</tt></b> 4750 <td> 4751 <td>Bool (RO) 4752 <td> 4753 <td>Rendering parameters OK 4754<tr valign=top> <td><b><tt>upSelectComponentCommands</tt></b> 4755 <td> 4756 <td>String[ ] 4757 <td> 4758 <td>Establish color (output order!) 4759<tr valign=top> <td><b><tt>upSetLineFeedCommand</tt></b> 4760 <td> 4761 <td>String 4762 <td> 4763 <td>Adjust linefeed (Epson only) 4764<tr valign=top> <td><b><tt>upVersion</tt></b> 4765 <td> 4766 <td>String (RO) 4767 <td> 4768 <td>Source code version 4769<tr valign=top> <td><b><tt>upWeaveFinalPins</tt></b> 4770 <td> 4771 <td>Int[ ] 4772 <td> 4773 <td>Number of bottom pins on EOP passes 4774<tr valign=top> <td><b><tt>upWeaveFinalScan</tt></b> 4775 <td> 4776 <td>Int 4777 <td> 4778 <td>Begin EOP passes (Y-coord) 4779<tr valign=top> <td><b><tt>upWeaveFinalXStarts</tt></b> 4780 <td> 4781 <td>Int[ ] 4782 <td> 4783 <td>X-pass indices for EOP passes 4784<tr valign=top> <td><b><tt>upWeaveFinalYFeeds</tt></b> 4785 <td> 4786 <td>Int[ ] 4787 <td> 4788 <td>Y increments for EOP passes 4789<tr valign=top> <td><b><tt>upWeaveInitialPins</tt></b> 4790 <td> 4791 <td>Int[ ] 4792 <td> 4793 <td>Number of top pins on BOP passes 4794<tr valign=top> <td><b><tt>upWeaveInitialScan</tt></b> 4795 <td> 4796 <td>Int 4797 <td> 4798 <td>End BOP passes (Y coord) 4799<tr valign=top> <td><b><tt>upWeaveInitialXStarts</tt></b> 4800 <td> 4801 <td>Int[ ] 4802 <td> 4803 <td>X-pass indices for BOP passes 4804<tr valign=top> <td><b><tt>upWeaveInitialYFeeds</tt></b> 4805 <td> 4806 <td>int[ ] 4807 <td> 4808 <td>Y increments for BOP passes 4809<tr valign=top> <td><b><tt>upWeavePasses</tt></b> 4810 <td> 4811 <td>Int 4812 <td> 4813 <td>XPasses × YPasses 4814<tr valign=top> <td><b><tt>upWeaveXPasses</tt></b> 4815 <td> 4816 <td>Int 4817 <td> 4818 <td>Number of X passes 4819<tr valign=top> <td><b><tt>upWeaveXStarts</tt></b> 4820 <td> 4821 <td>Int[ ] 4822 <td> 4823 <td>X-pass indices for normal passes 4824<tr valign=top> <td><b><tt>upWeaveYFeeds</tt></b> 4825 <td> 4826 <td>Int[ ] 4827 <td> 4828 <td>Y increments for normal passes 4829<tr valign=top> <td><b><tt>upWeaveYOffset</tt></b> 4830 <td> 4831 <td>Int 4832 <td> 4833 <td>Number of blank or incomplete scans at BOP 4834<tr valign=top> <td><b><tt>upWeaveYPasses</tt></b> 4835 <td> 4836 <td>Int 4837 <td> 4838 <td>Number of X passes 4839<tr valign=top> <td><b><tt>upWhiteTransfer</tt></b> 4840 <td> 4841 <td>Float[ ] 4842 <td> 4843 <td>White transfer (monochrome devices!) 4844<tr valign=top> <td><b><tt>upWriteComponentCommands</tt></b> 4845 <td> 4846 <td>String[ ] 4847 <td> 4848 <td>Commands to write each component 4849<tr valign=top> <td><b><tt>upWroteData</tt></b> 4850 <td> 4851 <td>Bool (RO) 4852 <td> 4853 <td>Something (<b><tt>BeginJob</tt></b>) written to output 4854<tr valign=top> <td><b><tt>upXMoveCommand</tt></b> 4855 <td> 4856 <td>String 4857 <td> 4858 <td>X positioning command 4859<tr valign=top> <td><b><tt>upXStepCommand</tt></b> 4860 <td> 4861 <td>String 4862 <td> 4863 <td>Single step to the right 4864<tr valign=top> <td><b><tt>upYFlip</tt></b> 4865 <td> 4866 <td>Bool 4867 <td> 4868 <td>Flips output along the Y axis 4869<tr valign=top> <td><b><tt>upYMoveCommand</tt></b> 4870 <td> 4871 <td>String 4872 <td> 4873 <td>Y positioning command 4874<tr valign=top> <td><b><tt>upYStepCommand</tt></b> 4875 <td> 4876 <td>String 4877 <td> 4878 <td>Single step down 4879<tr valign=top> <td><b><tt>upYellowTransfer</tt></b> 4880 <td> 4881 <td>Float[ ] 4882 <td> 4883 <td>Yellow transfer 4884</table></blockquote> 4885 4886<h3><a name="Uni_honors"></a><b><tt>uniprint</tt></b>'s Roll of Honor</h3> 4887 4888<p> 4889I should mention all of the people who were involved in 4890<b><tt>stcolor</tt></b>'s evolution, but I've decided to start from scratch 4891here for <b><tt>uniprint</tt></b>: 4892 4893<blockquote> 4894<dl> 4895<dt>John P. Beale 4896<dd>for testing the <b><tt>stc600</tt></b> modes 4897<dt>Bill Davidson 4898<dd>who triggered some weaving research and tested <b><tt>stc2s_h</tt></b> 4899<dt>L. Peter Deutsch 4900<dd>who triggered ease of configuration 4901<dt>Mark Goldberg 4902<dd>who prepared the <b><tt>stc500</tt></b> transfers 4903<dt>Scott F. Johnston and Scott J. Kramer 4904<dd>for testing the <b><tt>stc800</tt></b> modes 4905<dt>Martin Lottermoser 4906<dd>for his great commented H-P DeskJet driver 4907<dt>Helmut Riegler 4908<dd>for the BJC extension 4909<dt>Hans-Gerd Straeter 4910<dd>for some measured transfer curves and more 4911<dt>Uli Wortmann 4912<dd>for discussions and his <b><tt>cdj850</tt></b> driver 4913<dt>My family 4914<dd>for tolerating my printer-driver hacking 4915</dl> 4916</blockquote> 4917 4918<address> 4919Gunther Hess<br> 4920Duesseldorfer Landstr. 16b<br> 4921D-47249 Duisburg<br> 4922Germany<br> 4923+49 203 376273 telephone (MET evening hours)<br> 4924<<a href="mailto:ghess@elmos.de">ghess@elmos.de</a>> 4925</address> 4926<h3><a name="Uni_weaving_howto"></a><tt>Uniprint</tt> weaving parameters howto</h3> 4927This section was contributed by Glenn Ramsey.<p> 4928<p>I wrote this because the documentation was very brief and I really struggled 4929with it for a while, but it is very simple once you understand what is going 4930on. 4931<p>This only describes how to work out the Y parameters, I haven't looked 4932at the X parameters yet. 4933<ol> 4934<li> 4935<b>Determine the nozzle geometry (upOutputPins)</b> 4936<p> 4937You need to know how many nozzles the printer has and the spacing between 4938them. Usually you can find this out from the printer manual, or the printer 4939supplier, but you may have to dissect a couple of printer output files 4940produced with the driver supplied with the printer. There is a utility 4941called escp2ras<a href="#escp2ras"><sup>*</sup></a> that will help with that. 4942Sometimes the term pin is used instead of nozzle but they mean the same thing. 4943<p>The number of nozzles will be the value assigned to the upOutputPins 4944parameter. 4945<p>Actually you don't have to print with all the pins available but for 4946the purpose of demonstration I'll assume that we are using them all. 4947<p> 4948<a name="escp2ras"></a>* escp2ras is available from Gunther Hess' page at <a href="http://www-md.e-technik.uni-rostock.de/ma/gunther/gs/index.html">http://www-md.e-technik.uni-rostock.de/ma/gunther/gs/index.html</a> 4949</li> 4950<p> 4951<li><b>Determine how many passes are required (upWeaveYPasses)</b> 4952<p>The number of passes required is going to depend on the required resolution 4953and the nozzle spacing. 4954<blockquote> 4955<tt>passes = resolution * nozzle spacing 4956</tt> 4957</blockquote> 4958This will be the value assigned to the upWeaveYPasses parameter. 4959<p>For example if the desired resolution is 360 dpi and the nozzles are 4960spaced at 1/90in then 360 * 1/90 = 4 passes are required. For 720 dpi 8 4961passes would be required. The printer would, of course, have to be capable 4962of moving the paper in increments of either 360 or 720 dpi too. 4963</li> 4964<p> 4965<li> 4966<b>Determine the normal Y feed increment (upWeaveYFeeds)</b> 4967<p> 4968You need to work out how much to feed the paper so that when the paper 4969has moved by one head length in however many passes you have then each 4970row space on the paper has been passed over by at least one nozzle. There 4971will be one feed value for each pass and the feed values must comply with 4972the following rules: 4973<blockquote> 4974<tt> 4975<p>sum of feeds = passes * nozzles 4976<br>feed%passes != 0 (feed is not exactly divisible by passes) 4977<br>sum of (nozzles - feed) = 0 4978</tt> 4979</blockquote> 4980<p>For example if passes=4 and nozzles=15, then sum of feeds=60. The feed 4981values could be 1,1,1,57 or 15,15,15,15 or 14,15,18,13. 4982<p>These values will be assigned to the upWeaveYFeeds parameter. 4983<p>You would need to experiment to see what combination looks best on the 4984printer. 4985<p>I found it convenient to draw several lines of nozzles and then move 4986them around to see how the different combinations would fill the paper. 4987A computer drawing tool makes this easier than pencil and paper (I used 4988Dia, a GNOME app). The number of nozzles would probably be be a good place 4989to start. 4990<p>Remember that if the number of passes is more than 1 then the feed increment 4991will be less than the nozzle spacing and <tt>passes × feed increment size</tt> 4992must equal the physical distance between each nozzle. 4993</li> 4994<p> 4995<li> 4996<b>Determine the beginning of page pins (upWeaveInitialPins)</b> 4997<p> 4998These values will be assigned to the upWeaveInitialPins parameter and are 4999the numbers of nozzles to operate in each of the initial passes at the top 5000of a page. The nozzles that the values refer to are the topmost nozzles 5001on the head, nearest the top margin. If the image doesn't start at the 5002top margin then uniprint doesn't use these feeds. 5003<p>I don't know a mathematical relation for this except that at least one 5004of the values must be the number of nozzles, but I'm sure that there must 5005be one. I used a graphical method, the description that follows refers 5006to the ascii diagram in below. 5007<p>Draw a line of nozzles for each pass arranged as they would be using 5008the normal Y feed increment determined in step 3. In the diagram below 5009this would be passes 5-8. 5010<p>Draw a line of nozzles that would print just before the first normal 5011pass. The feed increment for this pass will be close to and most likely 50121 or 2 units less than the feed increment of the last normal pass. In the 5013example below this line is pass 4 and the feed increment is 13 whereas 5014the normal feed increment is 15. 5015<p>Draw each pass before that with a small feed increment so that if all 5016of the nozzles appearing above the first nozzle of the first normal pass 5017operate then all of the spaces will be filled. This feed increment is usually 50181 except in cases where some jiggery pokery is going on to make the printer 5019print at an apparent higher resolution than the nozzle diameter. 5020<p>Now select the nozzles that will operate in each of theses initial passes 5021so that the paper is filled. In each pass the nozzles must be adjacent 5022to each other and at least one of the passes will have all the nozzles 5023operating. I suspect that for each combination of normal Y feed increments 5024there will only be one set of valid beginning of page increments. 5025</li> 5026</ol> 5027<h4>Example: stc.upp from Aladdin Ghostscript 6.01</h4> 502815 nozzles spaced at 1/90 in, 360 dpi requires 4 passes. 5029<blockquote><tt><pre> 5030-dupWeaveYPasses=4 5031-dupOutputPins=15 5032-dupWeaveYFeeds="{15 15 15 15}" 5033-dupWeaveInitialYFeeds="{1 1 1 13}" 5034-dupWeaveInitialPins="{ 4 15 11 7}" 5035</pre></tt></blockquote> 5036The following diagram shows which nozzles operate during each pass. 5037<br>Passes 1-4 are beginning of page passes and passes 5-8 are normal passes. 5038<blockquote> 5039<p>x=nozzle operates, o=nozzle not used in this pass<tt></tt> 5040<p><tt> 1 2 3 4 5 6 7 8 - pass no</tt> 5041<br><tt>0 x</tt> 5042<br><tt>1 x</tt> 5043<br><tt>2 x</tt> 5044<br><tt>3 x</tt> 5045<br><tt>4 x</tt> 5046<br><tt>5 x</tt> 5047<br><tt>6 x</tt> 5048<br><tt>7 x</tt> 5049<br><tt>8 x</tt> 5050<br><tt>9 x</tt> 5051<br><tt>0 x</tt> 5052<br><tt>1 x</tt> 5053<br><tt>2 x</tt> 5054<br><tt>3 x</tt> 5055<br><tt>4 x</tt> 5056<br><tt>5 x</tt> 5057<br><tt>6 o x</tt> 5058<br><tt>7 x</tt> 5059<br><tt>8 x</tt> 5060<br><tt>9 x</tt> 5061<br><tt>0 o x</tt> 5062<br><tt>1 x</tt> 5063<br><tt>2 x</tt> 5064<br><tt>3 x</tt> 5065<br><tt>4 o x</tt> 5066<br><tt>5 x</tt> 5067<br><tt>6 x</tt> 5068<br><tt>7 x</tt> 5069<br><tt>8 o x</tt> 5070<br><tt>9 x</tt> 5071<br><tt>0 x</tt> 5072<br><tt>1 o x</tt> 5073<br><tt>2 o x</tt> 5074<br><tt>3 x</tt> 5075<br><tt>4 x</tt> 5076<br><tt>5 o x</tt> 5077<br><tt>6 o x</tt> 5078<br><tt>7 x</tt> 5079<br><tt>8 x</tt> 5080<br><tt>9 o x</tt> 5081<br><tt>0 o x</tt> 5082<br><tt>1 x</tt> 5083<br><tt>2 x</tt> 5084<br><tt>3 o x</tt> 5085<br><tt>4 o x</tt> 5086<br><tt>5 x</tt> 5087<br><tt>6 o 5088x</tt> 5089<br><tt>7 o x</tt> 5090<br><tt>8 o x</tt> 5091<br><tt>9 x</tt> 5092<br><tt>0 o 5093x</tt> 5094<br><tt>1 o x</tt> 5095<br><tt>2 o x</tt> 5096<br><tt>3 x</tt> 5097<br><tt>4 o 5098x</tt> 5099<br><tt>5 o x</tt> 5100<br><tt>6 o x</tt> 5101<br><tt>7 x</tt> 5102<br><tt>8 o 5103x</tt> 5104<br><tt>9 o x</tt> 5105<br><tt>0 x</tt> 5106<br><tt>1 5107x</tt> 5108<br><tt>2 5109x</tt> 5110<br><tt>3 x</tt> 5111<br><tt>4 x</tt> 5112<br><tt>5 5113x</tt> 5114<br><tt>6 5115x</tt> 5116<br><tt>7 x</tt> 5117<br><tt>8 x</tt> 5118<br><tt>9 5119x</tt> 5120<br><tt>0 5121x</tt> 5122<br><tt>1 x</tt> 5123<br><tt>2 x</tt> 5124<br><tt>3 5125x</tt> 5126<br><tt>4 5127x</tt> 5128<br><tt>5 x</tt> 5129<br><tt>6</tt> 5130<br><tt>7 5131x</tt> 5132<br><tt>8 5133x</tt> 5134<br><tt>9 x</tt> 5135<br><tt>0</tt> 5136<br><tt>1 5137x</tt> 5138<br><tt>2 5139x</tt> 5140<br><tt>3 x</tt> 5141<br><tt>4</tt> 5142<br><tt>5 5143x</tt> 5144<br><tt>6 5145x</tt> 5146<br><tt>7 x</tt> 5147<br><tt>8</tt> 5148<br><tt>9 5149x</tt> 5150<br><tt>0 5151x</tt> 5152<br><tt>1</tt> 5153<br><tt>2</tt> 5154<br><tt>3 5155x</tt> 5156<br><tt>4 5157x</tt> 5158<br><tt>5</tt> 5159<br><tt>6</tt> 5160<br><tt>7 5161x</tt> 5162<br><tt>8 5163x</tt> 5164<br><tt>9</tt> 5165<br><tt>0</tt> 5166<br><tt>1 5167x</tt> 5168<br><tt>2 5169x</tt> 5170<br><tt>3</tt> 5171<br><tt>4</tt> 5172<br><tt>5 5173x</tt> 5174<br><tt>6</tt> 5175<br><tt>7</tt> 5176<br><tt>8</tt> 5177<br><tt>9 5178x</tt> 5179<br><tt>0</tt> 5180<br><tt>1</tt> 5181<br><tt>2</tt> 5182<br><tt>3 5183x</tt> 5184<br><tt>4</tt> 5185<br><tt>5</tt> 5186<br><tt>6</tt> 5187<br><tt>7 5188x</tt> 5189</blockquote> 5190<p>These parameters would also work: 5191<blockquote><tt><pre> 5192-dupWeaveYPasses=4 5193-dupOutputPins=15 5194-dupWeaveYFeeds="{14 15 18 13}" 5195-dupWeaveInitialYFeeds="{1 1 1 13}" 5196-dupWeaveInitialPins="{ 4 11 7 15}" 5197</pre></tt></blockquote> 5198<p> 5199<hr> 5200<h3><a name="Uni_esc300"></a>Extension to <tt>uniprint</tt> for the Epson Stylus Color 300</h3> 5201This section was contributed by Glenn Ramsey.<p> 5202The Epson Stylus Color 300 uses a different command set to other Epson 5203Stylus Color printers that use the ESC/P2 language. As far as I can 5204tell its commands are a subset of ESC/P2. In ESC/P2 the colour to be 5205printed is selected by a 'set colour' command and then the data sent 5206is only printed in that colour until the colour is changed with another 5207'set colour' command. The Stylus Color 300 lacks this functionality. 5208The data sent to the printer maps directly to the ink nozzles and colour 5209of an output scan line in the printed output is determined by the position 5210of the scan line within the data. This means that the driver must know 5211how the nozzles are arranged and must format the output accordingly. 5212The extension adds a format that I have called EscNozzleMap and adds some 5213 additional parameters to uniprint.<br> 5214<ul> 5215 <li><b><tt>upOutputFormat</tt></b>selects the output method, and should be set to the value 5216<b><tt>/EscNozzleMap</tt></b> to select this format. 5217 <blockquote> 5218 <table cellpadding="0" cellspacing="0"> 5219 <tbody> 5220 <tr valign="Top"> 5221 <td><b><tt>/EscNozzleMap</tt></b></td> 5222 <td> </td> 5223 <td>produces output for the Epson Stylus Color 300 5224 </td> 5225 </tr> 5226 <tbody> 5227 </table> 5228 </blockquote> 5229</ul> 5230 5231<blockquote> 5232 <table cellpadding="0" cellspacing="0"> 5233 <tbody> 5234 <tr> 5235 <th colspan="5" bgcolor="#cccc00"> 5236 <hr><font size="+1"><b><tt>uniprint</tt></b> parameters for the 5237 EscNozzleMap format</font> 5238 <hr></th> 5239 </tr> 5240 <tr valign="Bottom"> 5241 <th align="Left">Parameter 5242 </th> 5243 <td> 5244 </td> 5245 <th align="Left">Type 5246 </th> 5247 <td> 5248 </td> 5249 <th align="Left">Use 5250 </th> 5251 </tr> 5252 <tr> 5253 <td colspan="5"> 5254 <hr></td> 5255 </tr> 5256 <tr valign="Top"> 5257 <td><b><tt>upNozzleMapRowsPerPass</tt></b></td> 5258 <td> 5259 </td> 5260 <td>Int 5261 </td> 5262 <td> 5263 </td> 5264 <td>output rows to generate for each pass of the head 5265 </td> 5266 </tr> 5267 <tr valign="Top"> 5268 <td><b><tt>upNozzleMapPatternRepeat</tt></b></td> 5269 <td> 5270 </td> 5271 <td>Int 5272 </td> 5273 <td> 5274 </td> 5275 <td>no. of rows that correspond to the repeat pattern of the 5276 nozzles 5277 </td> 5278 </tr> 5279 <tr valign="Top"> 5280 <td><b><tt>upNozzleMapRowMask</tt></b></td> 5281 <td> 5282 </td> 5283 <td>Int[] 5284 </td> 5285 <td> 5286 </td> 5287 <td>mask indicating the colour of the nozzles 5288 </td> 5289 </tr> 5290 <tr valign="Top"> 5291 <td><b><tt>upNozzleMapMaskScanOffset</tt></b></td> 5292 <td> 5293 </td> 5294 <td>Int[] 5295 </td> 5296 <td> 5297 </td> 5298 <td>mask indicating the physical position of the nozzles 5299 </td> 5300 </tr> 5301 </tbody> 5302 </table> 5303</blockquote> 5304 5305<h4>A more detailed description of the new parameters</h4> 5306<ul> 5307 <li><b><tt>upNozzleMapRowsPerPass</tt></b><br> 5308 The number of rows of data that are required to address all nozzles for a 5309 single pass of the head. There will always be this number of rows of output 5310 data generated. I'd expect it to be the same as the total number of nozzles but 5311 it wouldn't break the formatter if it wasn't. So if you wanted to print with 5312 only the 10th nozzle then row 10 would contain data corresponding to the bit 5313 pattern and all of the others would be padded with zeros. 5314 </li> 5315 <li><b><tt>upNozzleMapPatternRepeat</tt></b><br> 5316 The number of nozzles in each repeated group on the printing head. 5317 This parameter must correspond with the length of the upNozzleMapRowMask array. 5318 </li> 5319 <li><b><tt>upNozzleMapRowMask</tt></b><br> 5320 An array of integers that defines the colour of the nozzles on the 5321 head and whether the nozzles will be used to print. The array index 5322 defines the row index for the nozzle in the output data 5323 and the value defines the colour of the nozzle. The mapping 5324 of colours to values is defined in the table below. 5325 <blockquote> 5326 <table cellpadding="0" cellspacing="0"> 5327 <tbody> 5328 <tr valign="Bottom"> 5329 <th align="Left">colour 5330 </th> 5331 <td> 5332 </td> 5333 <th align="center">mask value 5334 </th> 5335 </tr> 5336 <tr> 5337 <td colspan="5"> 5338 <hr></td> 5339 </tr> 5340 <tr valign="Top" align="middle"> 5341 <td><b><tt>K</tt></b></td> 5342 <td> 5343 </td> 5344 <td>1 5345 </td> 5346 </tr> 5347 <tr valign="Top" align="middle"> 5348 <td><b><tt>C</tt></b></td> 5349 <td> 5350 </td> 5351 <td>2 5352 </tr> 5353 <tr valign="Top" align="middle"> 5354 <td><b><tt>M</tt></b></td> 5355 <td> 5356 </td> 5357 <td>3 5358 </td> 5359 </tr> 5360 <tr valign="Top" align="middle"> 5361 <td><b><tt>Y</tt></b></td> 5362 <td> 5363 </td> 5364 <td>4 5365 </td> 5366 </tr> 5367 <tr valign="Top" align="middle"> 5368 <td><b><tt>no data</tt></b></td> 5369 <td> 5370 </td> 5371 <td>0 5372 </td> 5373 </tr> 5374 </tbody> 5375 </table> 5376 </blockquote> 5377 A value of 0 means that the nozzle is not used and the row in the output data will be 5378 padded with zeros.<br> 5379 </li> 5380 <li><b><tt>upNozzleMapMaskScanOffset</tt></b><br> 5381 An array of integers that defines the physical position of the nozzles relative 5382 to the first nozzle in the repeated group. The relative distance is measured in 5383 printed line widths and will be different for different printing resolutions. 5384 This parameter is used because the physical spacing of the nozzles may not 5385 correspond to their mapping in the output data. For example the ESC300 has nozzles 5386 physically arranged something like this: 5387 <table> 5388 <tr> 5389 <td bgcolor="#00ffff"> 5390 </td> 5391 <td bgcolor="#ffff00"> 5392 </td> 5393 <td bgcolor="#000000"> 5394 </td> 5395 <td bgcolor="#ff00ff"> 5396 </td> 5397 <td bgcolor="#000000"> 5398 </td> 5399 <td> 5400 </td> 5401 <td bgcolor="#000000"> 5402 </td> 5403 <td> 5404 </td> 5405 <td> 5406 </td> 5407 <td> 5408 </td> 5409 <td> 5410 </td> 5411 <td> 5412 </td> 5413 <td bgcolor="#00ffff"> 5414 </td> 5415 <td bgcolor="#ffff00"> 5416 </td> 5417 <td bgcolor="#000000"> 5418 </td> 5419 <td bgcolor="#ff00ff"> 5420 </td> 5421 <td bgcolor="#000000"> 5422 </td> 5423 <td> 5424 </td> 5425 <td bgcolor="#000000"> 5426 </td> 5427 <td bgcolor="#ffffff"> 5428 </td> 5429 </tr> 5430 <td> 5431 </td> 5432 <td> 5433 </td> 5434 <td> 5435 </td> 5436 <td> 5437 </td> 5438 <td> 5439 </td> 5440 <td> 5441 </td> 5442 <td bgcolor="#00ffff"> 5443 </td> 5444 <td bgcolor="#ffff00"> 5445 </td> 5446 <td bgcolor="#000000"> 5447 </td> 5448 <td bgcolor="#ff00ff"> 5449 </td> 5450 <td bgcolor="#000000"> 5451 </td> 5452 <td> 5453 </td> 5454 <td bgcolor="#000000"> 5455 </td> 5456 <td> 5457 </td> 5458 <td> 5459 </td> 5460 <td> 5461 </td> 5462 <td> 5463 </td> 5464 <td> 5465 </td> 5466 <td bgcolor="#00ffff"> 5467 </td> 5468 <td bgcolor="#ffff00"> 5469 </td> 5470 <td>etc ... 5471 </td> 5472 5473 <tr> 5474 </tr> 5475 </table> 5476 There is a one nozzle width space between the last two nozzles in each group. 5477 In the output data the data for the last nozzle in the group would be in row 5 5478 (numbering starts at 0) but the nozzle is physically positioned at 6 spaces from 5479 the first nozzle. 5480</ul> 5481<h4>Example 1 - Epson Stylus Color 300 - 360 dpi colour</h4> 5482<blockquote><pre> 5483-dupWeaveYPasses=6 5484-dupOutputPins=11 5485-dupWeaveYFeeds="{ 11 11 11 11 11 11 }" 5486-dupWeaveInitialYFeeds="{ 1 1 1 1 1 7 }" 5487-dupWeaveInitialPins="{ 2 11 9 7 5 3 }" 5488-dupNozzleMapRowsPerPass=64 5489-dupNozzleMapPatternRepeat=6 5490-dupNozzleMapRowMask="{ 2 4 1 3 0 0 }" 5491-dupNozzleMapMaskScanOffset="{ 0 1 2 3 0 0 }" 5492</pre></blockquote> 5493The weaving parameters are the same as for any other uniprint driver 5494but they must be consistent with the nozzle map parameters. In this printer 5495the coloured nozzles are spaced at 1/60" so 6 passes are required for 360 5496dpi resolution. 5497<p> 5498In the example there are 64 rows of data required for each head pass. Each 5499row must be completely filled with data for each pass so if certain nozzles 5500do not print in the pass then the rows for those nozzles will be padded 5501with zeroes. 5502<P> 5503The row mask translates to "C Y K M 0 0" so in the output data rows 0,7,13,... 5504will contain data for cyan, rows 1,8,14,... will contain data for yellow, etc. Rows 4,10,16,... 5505and 5, 11,15,... will always be padded with zeroes. The <i>upNozzleMapPatternRepeat</i> 5506parameter defines the length of the mask. 5507<p> 5508The row mask is repeated for each group of <i>upNozzleMapPatternRepeat</i> rows 5509in the output data. In this case there are 64 rows so there will be 10 groups 5510of "C Y K M 0 0" followed by "C Y K M" which is equivalent to 11 output 5511pins. 5512<P> 5513The <i>upNozzleMaskScanOffset</i> array indicates how the data from the scan 5514buffer is mapped to the output data. The data is presented to the formatter 5515as a buffer of four colour scanlines. The index of the scanline being printed, 5516lets call it y, always corresponds, in this example, to the physical position of 5517the cyan nozzle but since the nozzles are not on the same horizontal 5518line then the other colours for the current pass must come from other 5519scanlines in the scan buffer. The example is { 0 1 2 3 0 0 }, this means that 5520when printing a 4 colour image the magenta data would come from scanline y+3, 5521the black from scanline y+2, etc. It would have been possible in this case 5522to use the array index instead of the <i>upNozzleMaskScanOffset</i> parameter 5523however the parameter is necessary to be able to use the full capability of the 5524printer in black only mode. 5525 5526<h4>Example 2 - Epson Stylus Color 300 - 180 dpi black only</h4> 5527<blockquote> 5528<pre> 5529-dupMargins="{ 9.0 39.96 9.0 9.0}" 5530-dupWeaveYPasses=1 5531-dupOutputPins=31 5532-dupNozzleMapRowsPerPass=64 5533-dupNozzleMapPatternRepeat=6 5534-dupNozzleMapRowMask="{ 0 0 1 0 1 1}" 5535-dupNozzleMapMaskScanOffset="{ 0 0 0 0 1 2 }" 5536</pre> 5537</blockquote> 5538In this example there is no weaving. 5539<p> 5540The ESC300 has black nozzles evenly physically arranged as K K K but the data must 5541be sent to the printer as 00K0KK. This is handled by the <i>upNozzleMapRowMask</i> 5542and <i>upNozzleMaskScanOffset</i> arrays. The <i>upNozzleMapRowMask</i> array is 5543{ 0 0 1 0 1 1} which translates to { 0 0 K 0 K K } so rows 0, 1 and 3 will always 5544contain zeros and the other rows will contain data. 5545<p> 5546The <i>upNozzleMaskScanOffset</i> array 5547in this case is { 0 0 0 0 1 2 } so if the data for the 1st nozzle comes from row 5548y in the scan buffer then the data for the 2nd and 3rd nozzles will come from rows 5549y+1 and y+2. 5550 5551<h4>Example 3 - Epson Stylus Color 300 - 360 dpi black only</h4> 5552<blockquote> 5553<pre> 5554-dupWeaveYPasses=2 5555-dupOutputPins=31 5556-dupWeaveYFeeds="{31 31}" 5557-dupWeaveInitialYFeeds="{1 31}" 5558-dupWeaveInitialPins="{16 31}" 5559-dupNozzleMapRowsPerPass=64 5560-dupNozzleMapPatternRepeat=6 5561-dupNozzleMapRowMask="{ 0 0 1 0 1 1}" 5562-dupNozzleMapMaskScanOffset="{ 0 0 0 0 2 4 }" 5563</pre> 5564</blockquote> 5565In this example 2 weave passes are required to achieve the desired resolution. 5566<p> 5567The <i>upNozzleMaskScanOffset</i> array in this case is { 0 0 0 0 2 4 } because 5568there are two weave passes so if the data for the first nozzle comes from row y 5569in the scan buffer then the data for the 2nd and 3rd nozzles must come from rows 5570y+(1*2) and y+(2*2). 5571<p> 5572<address> 5573Glenn Ramsey<br> 5574glennr at users.sourceforge.net<br> 5575February 2001 5576</address> 5577<br> 5578 5579<!-- [3.0 begin visible trailer] =========================================== --> 5580<hr> 5581 5582<p> 5583<small>Copyright © 2002 artofocode LLC. All rights reserved.</small> 5584 5585<p> 5586<small> 5587This software is provided AS-IS with no warranty, either express or 5588implied. 5589 5590This software is distributed under license and may not be copied, 5591modified or distributed except as expressly authorized under the terms 5592of the license contained in the file LICENSE in this distribution. 5593 5594For more information about licensing, please refer to 5595http://www.ghostscript.com/licensing/. For information on 5596commercial licensing, go to http://www.artifex.com/licensing/ or 5597contact Artifex Software, Inc., 101 Lucas Valley Road #110, 5598San Rafael, CA 94903, U.S.A., +1(415)492-9861. 5599</small> 5600 5601<p> 5602<small>Ghostscript version 8.53, 20 October 2005 5603 5604<!-- [3.0 end visible trailer] ============================================= --> 5605 5606</body> 5607</html> 5608