Gutenprint + CUPS backends for Dye Sublimation printers
Find a file
2016-10-13 08:19:40 -04:00
icm Add in icc files for the Mitsubishi CP-9800DW 2016-10-12 20:29:14 -04:00
lib70x mitsu70x: default data path should be /usr/local instead. 2016-10-06 08:20:52 -04:00
lib6145 mitsu70x: Bundle the library and rearrange a few things. 2016-10-05 09:52:56 -04:00
misc-patches Mainline has multicut merged now. CVS shapshot from 2015-09-08 or 2015-09-07 19:15:32 -04:00
testjobs Add in a test job for the mitsu 9800 family (non-matte) 2016-10-13 08:19:40 -04:00
.gitattributes Initial commit of current sources. 2012-10-26 22:06:47 -04:00
.gitignore Update gitignore 2016-10-05 10:42:23 -04:00
backend_canonselphy.c all: Major updates to CUPS marker reporting 2016-08-19 17:40:12 -04:00
backend_citizencw01.c all: It's 2016 now, update the copyright text. 2016-01-24 09:44:19 -05:00
backend_common.c common: Replace a magic number with a libusb-defined sysmbol 2016-10-09 08:40:15 -04:00
backend_common.h mitsu9550: Rejigger it to handle the 9600 and 98x0 variations. 2016-10-13 08:12:20 -04:00
backend_dnpds40.c DNP: Don't report negative prints remaining when there's no loaded media. 2016-09-30 22:38:14 +03:00
backend_kodak605.c all: Fix up a a large pile of cppcheck warnings. 2016-08-21 10:23:00 -04:00
backend_kodak1400.c all: Fix up a a large pile of cppcheck warnings. 2016-08-21 10:23:00 -04:00
backend_kodak6800.c all: Fix up a a large pile of cppcheck warnings. 2016-08-21 10:23:00 -04:00
backend_mitsu70x.c mitsu70x: Documentation updates. 2016-10-09 08:59:21 -04:00
backend_mitsu9550.c mitsu9550: Rejigger it to handle the 9600 and 98x0 variations. 2016-10-13 08:12:20 -04:00
backend_shinkos1245.c shino_s1245: Add in marker level support. 2016-10-12 16:16:51 -04:00
backend_shinkos2145.c build: Experiment with LTO, fix some problems it uncovered. 2016-08-21 11:15:13 -04:00
backend_shinkos6145.c Marker message should include media type where it's known. (continued) 2016-08-25 08:19:10 -04:00
backend_shinkos6245.c Marker message should include media type where it's known. (continued) 2016-08-25 08:19:10 -04:00
backend_sonyupdr150.c all: It's 2016 now, update the copyright text. 2016-01-24 09:44:19 -05:00
blacklist Add the mitsu 9600 to the blacklist. 2016-10-13 00:07:27 -04:00
COPYING [misc] Add GPLv3 license text. 2012-10-26 23:41:11 -04:00
Makefile mitsu70x: default data path should be /usr/local instead. 2016-10-06 08:20:52 -04:00
README mitsu9550: 9600/9800/9810 will be handled by the same backend. 2016-10-12 23:33:07 -04:00

 ***************************************************************************

  Unified Gutenprint/CUPS backend for various Dye-Sublimation photo printers

  Copyright (c) 2007-2015 Solomon Peachy <pizza@shaftnet.org>

  This free software comes with ABSOLUTELY NO WARRANTY! 
  Licensed under the GNU GPL, see the 'COPYING' file for more details.

  The latest version can be found at
  
    http://git.shaftnet.org/cgit/selphy_print.git

  For a list of known bugs and development plans, see:

    http://bugs.shaftnet.org/index.php?project=4

 ***************************************************************************

  If you do not have one of the printers listed below, this backend is
  not relevant for you and you can just ignore all of this.

  Supported Printers:

   Canon SELPHY ES series
   Canon SELPHY CP series (except CP820, CP910, CP1000, CP1200)
   Kodak Professional 1400
   Kodak 305 Photo Printer
   Kodak 605 Photo Printer
   Kodak 805 Photo Printer
   Kodak 6800 Photo Printer
   Kodak 6850 Photo Printer
   Shinko CHC-S2145 (aka Sinfonia S2)
   Sony UP-DR150
   Sony UP-DR200
   DNP DS40 / Citizen CX
   DNP DS80 / Citizen CX-W
   DNP DS-RX1 / DS-RX1HS / Citizen CY 
   DNP DS620
   Citizen CW-01
   Mitsubishi CP-9550D/DW/DW-S/DZ/DZ-S
   Mitsubishi CP-3800DW
   Shinko CHC-S6145 (aka Sinfonia CS2)
   Ciaat Brava 21

  Work-in-progress Printers:

   DNP DS80DX
   Mitsubishi CP-D70DW, CP-D707DW, CP-K60DW-S, and CP-D80DW
   Mitsubishi CP-9600DW, CP-9800DW, CP-9810DW
   Fujifilm ASK-300
   Citizen CW-02 and CX2
   Olmec OP900 and OP900II
   ICI Imagedata OP900
   Sony UP-CR10L (aka DNP DS-SL10)
   Shinko CHC-S1245 (aka Sinfonia E1)
   Shinko CHC-S6245 (aka Sinfonia CE1)
   Shinko CHC-S6145-5A (aka Sinfonia CS2-c)   
   Kodak 8810
   Kodak 7000, 7010, and 7015

 ***************************************************************************

  This intelligent backend is needed to utilize many common dye-sublimation
  photo printers under Linux, OSX, and other UNIX-like operating systems.

  Although these printers advertise themselves as standard USB Printer Class
  devices, they do not actually obey those specifications and require 
  special two-way handshaking in order to successfully print.

  This backend can only be used in conjunction with Gutenprint 5.2.10 or
  newer.  Please see the Gutenprint README file (section II D) for more
  information on  use of this backend and integration into CUPS.
  
  Although this backend is bundled with Gutenprint, this repository is 
  considered the canonical upstream source where all development occurs.
  As such, when compared to the current Gutenprint release, the code found 
  here is often newer, with additional features or device support.  At the
  same time, it may have half-developed features that don't quite work, 
  with giant bugs that come out at midnight to eat your cat.

  On that note, please keep in mind that this software distributed
  in the hope that it will be useful, but WITHOUT ANY WARRANTY WHATSOEVER.

 ***************************************************************************

  This backend also supports a "standalone" mode that performs various 
  utility functions for selected printers, such as querying status and
  configuring various parameters. The exact commands supported for each
  printer are documented below.

 ***************************************************************************
  Compilation:

     This tool requires libusb 1.0 to build.  We highly recommend 
     v1.0.16 or newer due to general stability improvements. Versions
     older than 1.0.10 will require -DLIBUSB_PRE_1_0_10 to be defined 
     (see the Makefile).

     To further complicate things, libusb-1.0 had a temporary fork called
     libusbx, but that was merged back into libusb as of v1.0.18.  
     Consequently, your distribution package for libusb-1.0 may be 
     called libusbx instead.

     Fedora/RedHat:
	yum install libusbx-devel libusb1-devel
     Debian/Ubuntu
	apt-get install libusbx-dev libusb-1.0-0-dev

   And all you need to do after that is type 'make'

 ***************************************************************************
  CUPS backend usage:

   DEVICE_URI=someuri \
       gutenprint52+usb job-id user title num-copies options [ filename ]

    The backend generates output for CUPS to parse, including logging
    print counts, and if the printer supports it, reporting media type and
    remaining media counts.

 ***************************************************************************
  Standalone usage:

    This backend is set up as a multi-call executable; that is to say
    behaivor changes based on the name used to invoke the executable.
    When compiled, a set of symlinks are created, corresponding to each
    of the internal backends.  Alternatively you may set the BACKEND
    environment variable to force a specific backend to be used.  These
    commands are equivalent:

         BACKEND=backend gutenprint52+usb [ arguments ]
	 backend [ arguments ]

     All backends support the following invocations:

        backend [ arguments ]
	backend [ arguments ] filename
	backend [ arguments ] - < filename
	somecommand | backend [ arguments ] -

      The 'filename' here refers to the raw spool data generated by
      Gutenprint (eg via its gimp plugin) or the Windows print-to-file 
      output.

      All global arguments:

	   -D                 Increment debug level                      [1]
	   -G                 Display GPL text
	   -f                 Enable fast return mode if possible        [2]
	   -d numcopies       Print 'numcopies' of the supplied job

       [1]  This argument can be repeated to increase the debug level.
            Alternatively, the 'DYESUB_DEBUG' environment variable can be
	    used.  For example, '-DDD' and 'DYESUB_DEBUG=3' are equivalent.

		DYESUB_DEBUG=1		Enable debug output
		DYESUB_DEBUG=2		Dump contents of short messges
		DYESUB_DEBUG=3		Dump contents of all messages

       [2]  This terminates the backend as soon as the printer has
            acknowledged the print job, without waiting for the print job
	    to complete.  This can also be enabled by setting the
	    'FAST_RETURN' environment variable.  This is the default behavior
	    when using this backend with CUPS.  Not all backends support
	    fast return.

      If you have multiple models of the same printer family connected
      simultaneously, the backend will choose the first one it finds.
      If you wish to target a specific device, you may specify its
      serial number using the 'SERIAL' environment variable. For example:

            SERIAL=N782 backend filename [ arguments ]

       All backends support an additional operational mode, to test out
       unknown models. To use this mode, specify the VID, PID and its
       internal device type as environment variables:

            EXTRA_VID=04a9 EXTRA_PID=3ab1 EXTRA_TYPE=7 backend filename

       The VID and PID are specified in hexidecimal, and the TYPE is 
       the P_XXX enumeration defined in backend_common.h. The '7' in this
       example corresponds to most Canon SELPHY CP models, and is what you
       would use if you were trying to get the backend to detect an
       otherwise unrecognized SELPHY CP model.

       If you are able to successfuly print using this technique,
       please let us know so we can add the apppriate entry to the
       internal database.

    Finally, some backends support additional arguments; see below:

 *************************************************************************** 
  BACKEND=canonselphy

   Verified supported printers:
  
     ES1, ES2, ES3, ES30, ES40, CP-10, CP-100, CP-200, CP-300, CP-330, 
     CP400, CP500, CP510, CP710, CP720, CP730, CP740, CP750, CP760, CP770, 
     CP780, CP790, CP800, CP900

   Unverified/untested, but should work:  (let us know, please!)

     ES20, CP-220, CP520, CP530, CP600, CP810

   NOT supported:  (Printer does not need any special backend)

     CP820, CP910, CP1000, CP1200

   This backend does not support additional commands.

 *************************************************************************** 
  BACKEND=kodak1400

   Verified supported printers:

     Kodak 1400
     Kodak 805

   Valid commands:

     -C filename        Set tone curve [1]

  Notes:

    [1]  Format of curvedata file:

	 256 entries each of Yellow, Magenta, Cyan mappings:
	 Values are unsigned 16-bit big endian, between 0 and ???
	 (unsure as to the bit usage)

 *************************************************************************** 
  BACKEND=kodak6800

   Verified supported printers:

     Kodak 6800
     Kodak 6850

   Development was sponsored by:

        LiveLink Technology [ www.livelinktechnology.net ]

   Valid commands:

     -c filename        Query tone curve [1]
     -C filename        Set tone curve   [1]
     -m                 Query supported media
     -s                 Query printer status
     -R                 Reset printer to factory defaults     
     -X id              Cancel print job 'id' [2]

  Notes:

    [1]  Format of curvedata file:

	 256 entries each of Yellow, Magenta, Cyan mappings:
	 Values are unsigned 16-bit big endian, between 0 and 16383
	 (ie 14-bit)

    [2]  Job ID is the Internal Job ID (reported via status)
	   This cancels a multi-copy print job.
	   To see which jobs are active/pending, see the output of the
	   '-s' command, specifically the 'Bank' output.

 *************************************************************************** 
  BACKEND=kodak605

   Verified supported printers:

     Kodak 605

   Unsupported printers (Unknown VID/PID):

     Kodak 7000/7010/7015

   Valid commands:

     -C filename        Set tone curve   [1]
     -m                 Query supported media
     -s                 Query printer status

  Notes:

    [1]  Format of curvedata file:

	 256 entries each of Yellow, Magenta, Cyan mappings:
	 Values are unsigned 16-bit big endian, between 0 and ???
	 (unsure as to the bit usage)

 *************************************************************************** 
  BACKEND=shinkos2145

   Verified supported printers:

     Shinko CHC-S2145 (aka "Sinfonia S2")

   Development was initially sponsored by:

        LiveLink Technology [ www.livelinktechnology.net ]

   In order to use this backend, you will need to ensure the printer is
   configured to use the 'DRV' (as opposed to 'DLL') operating mode.  See 
   the printer documentation for details on how to set this.

   Valid commands:

     -b [ 0 | 1 ]       Disable or Enable the printer control panel.
     -c filename        Query User tone curve from flash        [1]
     -C filename        Store User tone curve in flash          [1]
     -e                 Query Error log
     -F                 Flash printer LEDs for 5 seconds
     -i                 Query printer firmware information
     -l filename        Query Current tone curve from RAM       [1]
     -L filename        Store Current tone curve in RAM         [1]
     -m                 Query media information
     -r                 Reset User tone curve to default        [4]
     -R                 Reset printer to factory defaults
     -s                 Query printer status
     -u                 Query user string
     -U somestring      Set user string to 'somestring'
     -X id              Cancel print job 'id'                    [3]

  Notes:

    [1]  Format of curvedata file:

	 256 entries each of Yellow, Magenta, Cyan mappings:
	 Values are unsigned 16-bit big endian, between 0 and 2047 
	 (ie only 11 bits used)

    [3]  Job ID is the Internal Job ID (reported via status)
	   This cancels a multi-copy print job.
	   To see which jobs are active/pending, see the output of the
	   '-s' command, specifically the 'Bank' output.

    [4]  Default printer tone curve is a linear 'val << 3'

 *************************************************************************** 
  BACKEND=shinkos1245

   Low-level documentation was provided by Sinfonia, Inc.  Thank you!

   Work-in-process printers:

     Shinko CHC-S1245 (aka "Sinfonia E1")

   Valid commands:

     -s                 Query printer status
     -m                 Query media information
     -u                 Query user string
     -U somestring      Set user string to 'somestring'
     -X id              Cancel print job 'id'                   [1]
     -R                 Reset printer to factory defaults     
     -F                 Tone curve commands affect FINE table
     -c filename        Query User tone curve from flash        [2]
     -C filename        Store User tone curve in flash          [2]
     -l filename        Query Current tone curve from RAM       [2]
     -L filename        Store Current tone curve in RAM         [2]

    [1]  Job ID is the Internal Job ID (reported via status)
	   This cancels a multi-copy print job.
	   To see which jobs are active/pending, see the output of the
	   '-s' command, specifically the 'Bank' output.

    [2]  Format of tone curve file:

	 256 entries each of Yellow, Magenta, Cyan mappings:
	 Values are unsigned 16-bit big endian, between 0 and 16383
	 (ie only 14 bits used)

 *************************************************************************** 
  BACKEND=shinkos6145

   Low-level documentation was provided by Sinfonia and CIAAT.
   Thank you!

   Verified supported printers:

     Shinko CHC-S6145 (aka "Sinfonia CS2")
     Ciaat Brava 21

   *** VERY IMPORTANT ***

     In order to generate usable output, the Sinfonia CHC-S6145 printer
     (and its siblings) require the input data to be transformed using
     specific image processing algorithms.

     The library that implements this processing is dynamically loaded
     at runtime. There are three options:

       * libS6145ImageProcess -- Supported by Sinfonia, this is a proprietary
         library only available for x86 and x86_64 linux targets. It can be
	 obtained by politely contacting your local Sinfonia distributor.

         If you have the appropriate permission fron Sinfonia and its
	 technical and legal limitations are acceptible to you, we recommend
         you use the supported libS6145ImageProcess library, as it will
	 generate the highest quality output.

       * libS6145ImageReProcess -- GPL'd re-implementation of the Sinfonia
         algorithms, available as source.  It is a drop-in replacement
	 that appears to generate identical output to the proprietary
	 Sinfonia library.

	 DISCLAIMER: Sinfonia Inc was not involved in the creation of
	 libS6145ImageReProcess and is not responsible in any way for any
	 deficiencies in its output. They will provide no support if it is
	 used.

         Do *NOT* contact Sinfonia for support if you are using
	 libS6146ImageReProcess.

	    (Please see the full disclaimer in libS6145ImageReProcess.c)

       * If neither of the above libraries are found, the backend will
         fall back to a very crude algorithm that generates low-quality
	 results not suitable for photographic output

     As selphy_print is released under the terms of the GPL, it cannot
     normally be combined with proprietary libraries.

     Therefore, the authors of selphy_print grant its users an additional
     permission (under section 7 of the GPLv3) to combine and/or redistribute
     it with the libS6145ImageProcess library.  For the full text of this
     license exception, please see the header of backend_shinkos6145.c

   Valid commands:

     -c filename        Query User tone curve from flash        [1]
     -C filename        Store User tone curve in flash          [1]
     -e                 Query Error log
     -F                 Flash printer LEDs for 5 seconds
     -i                 Query printer firmware information
     -k num		Specify standby delay (5-240 minutes)
     -l filename        Query Current tone curve from RAM       [1]
     -L filename        Store Current tone curve in RAM         [1]
     -m                 Query media information
     -q filename        Dump eeprom data
     -Q filename        Dump image correction data              [4]
     -r                 Reset User tone curve to default        [3]
     -R                 Reset printer to factory defaults
     -s                 Query printer status
     -X id              Cancel print job 'id'                   [2]

  Notes:

    [1]  Format of curvedata file:

	 256 entries each of Yellow, Magenta, Cyan mappings:
	 Values are unsigned 16-bit big endian, between 0 and 2047 
	 (ie only 11 bits used)

    [2]  Job ID is the Internal Job ID (reported via status)
	   This cancels a multi-copy print job.
	   To see which jobs are active/pending, see the output of the
	   '-s' command, specifically the 'Bank' output.

    [3]  Default printer tone curve is a linear 'val << 3'

    [4]  This is used as an input to the image processing code, and is
         only useful for debugging purposes.

 *************************************************************************** 
  BACKEND=shinkos6245

   Low-level documentation was provided by Sinfonia, Inc.  Thank you!

   Work-in-process printers:

     Shinko CHC-S6245 (aka "Sinfonia CE1")

   Unsupported printers (Unknown VID/PID):

     Kodak 8810

   Valid commands:

     -c filename        Query User tone curve from flash        [1]
     -C filename        Store User tone curve in flash          [1]
     -e                 Query Error log
     -F                 Flash printer LEDs for 5 seconds
     -i                 Query printer firmware information
     -k num		Specify standby delay (5-240 minutes)
     -l filename        Query Current tone curve from RAM       [1]
     -L filename        Store Current tone curve in RAM         [1]
     -m                 Query media information
     -r                 Reset User tone curve to default        [3]
     -R                 Reset printer to factory defaults
     -s                 Query printer status
     -X id              Cancel print job 'id'                   [2]

  Notes:

    [1]  Format of curvedata file:

	 256 entries each of Yellow, Magenta, Cyan mappings:
	 Values are unsigned 16-bit big endian, between 0 and 2047 
	 (ie only 11 bits used)

    [2]  Job ID is the Internal Job ID (reported via status)
	   This cancels a multi-copy print job.
	   To see which jobs are active/pending, see the output of the
	   '-s' command, specifically the 'Bank' output.

    [3]  Default printer tone curve is a linear 'val << 3'

 *************************************************************************** 
  BACKEND=sonyupdr150

   Verified supported printers:

    Sony UP-DR150
    Sony UP-DR200

  Unverified/untested, but should work:
   
   Sony UP-CR10L
   DNP DS-SL10

  This backend does not support additional commands.

 *************************************************************************** 
  BACKEND=mitsu70x

   Supported and tested printers:

    Kodak 305

   Untested but believed to work:

    Mitsubishi CP-D70DW
    Mitsubishi CP-D707DW
    Mitsubishi CP-K60DW-S

   Unsupported printers (Unknown VID/PID):

    Mitsubishi CP-D80DW
    Fujifilm ASK-300

   *** VERY IMPORTANT ***

        In order to generate usable output, this family of printers require
	the input data to be transformed using specific image processing
	algorithms.

	The library that implements this processing is dynamically loaded
	at runtime.  There is currently only one option:

	 * libMitsuD70ImageReProcess -- GPL'd re-implementation of the
	   Mitsubishi algorithms, available as source.  No guaranteees are
	   made about its output quality as compared to Mitsubishi's
	   proprietary drivers, but it is generally considered quite good.

	   DISCLAIMER:  Mitsubishi was not involved in the creation of
	   libMitsuD70ImageReProcess and is not responsible in any way for
	   any deficiencies in its output.  They will provide no support if
	   it is used.

	   Do *NOT* contact Mitsubishi for support if you are using
	   any combination of gutenprint, selphy_print or
	   libMitsuD80ImageReProcess.

             (Please see the full disclaimer in libMitsuD70ImageReProcess.c)

	 * If the above library is not found, the backend will fall back to
	   a very crude algorithm that generates low-quality results not
	   suitable for photographic output.

   Valid commands:

     -k num		Specify standby delay (1-60 minutes, 0 disables)
     -s                 Query printer status (Only partially decoded)
     -X id              Cancel print job 'id' [1]

    [1]  Job ID is the Internal Job ID (reported via status)
	   To see which jobs are active/pending, see the output of the
	   '-s' command.

 *************************************************************************** 
  BACKEND=mitsu9550

   Supported and tested printers:

    Mitsubishi CP-9550D/DW and CP-9550DZ/DZS/DW-S

   Work-in-progress printers:

    Mitsubishi CP-9600D/DW
    Mitsubishi CP-9800D/DW
    Mitsubishi CP-9810D/DW

   Valid commands:

     -s                 Query printer status
     -m                 Query printer media

 *************************************************************************** 
  BACKEND=dnpds40

   Verified supported printers:

    DNP DS40 / Citizen CX
    DNP DS80 / Citizen CX-W
    DNP DS-RX1 / DNP DS-RX1HS / Citizen CY
    DNP DS620

   Theoretically supported printers:  (Untested)

    Mitsubishi CP-3800DW
    Citizen CW-02/OP900II
    DNP DS80DX

   Work-in-progress printers: (USB PIDs unknown)

    Citizen CX2 (?)

   Development was initially sponsored by:

        Marco Di Antonio
        LiveLink Technology [ www.livelinktechnology.net ]

   This backend supports additional commands:

      dnpds40 [command [arg] ]

   Valid commands:

     -i                 Query printer information (resolution, etc)
     -I                 Query printer sensor information
     -n                 Query printer counters
     -N [ A | B | M ]   Reset Counter A/B/M                                 [2]
     -p num             Set 'P' counter to 'num'                            [2]
     -s                 Query printer status
     -k num		Specify standby delay (1-99 minutes, 0 disables)    [1]
     -K num		Keep Media Status Across Power Cycles (1 yes, 0 no) [1]
     -x num             Set USB iSerialNumber reporting (1 yes, 0 no)       [3]
     -X                 Cancel current job
     -R                 Reset printer to defaults

Notes:

     [1] Only supported by DS620
     [2] Certain printer features may require updating the printer firmware
     [3] Only supported by DS620 and RX1HS

 *************************************************************************** 
  BACKEND=citizencw01

   Verified supported printers:

    Citizen CW-01

   Work-in-progress printers: (USB PIDs unknown)

    Olmec OP900
    ICI Imagedata OP900

   This backend supports additional commands:

      cw01 [command [arg] ]

   Valid commands:

     -i                 Query printer information (resolution, etc)
     -n                 Query printer counters
     -s                 Query printer status
     -N [ A | B ]       Reset Counter A/B

 ***************************************************************************