Commit e3c13dbe authored by Didier Raboud's avatar Didier Raboud

Imported Upstream version 23

parent 603e9654
......@@ -11,6 +11,8 @@ TOPICS
INSTALLATION
------------
(Debian and ubuntu now have packages in repositories you can install)
There may be a more recent version available as a .deb file on sourceforge.
There may be a more recent source code version available as a .tar.gz file on sourceforge.
The general procedure will be like this if you compile from source.
(see below for details for different distros):
......@@ -117,6 +119,7 @@ Create printers:
From c2esp11 and later there is more than one ppd file: model 5200 has no duplex, model 5500 has duplex.
From c2esp13 and later there are 4 ppd files 5200 non duplex / 5500 duplex, dithered / non dithered
Select the file that best matches your printer model. Dithered is better quality, uses more memory and is slower.
From c2esp18 and later there is one ppd per printer model. Dithered/non dithered are choices in the colour options.
Click "Forward" and wait again for the "Describe printer" window.
Change the names if you wish, and click the "Apply" button.
Print test page if you wish, but you might do this first:
......@@ -125,22 +128,27 @@ Create printers:
I generally make 2 printers, one colour and one b/w. But that's not essential.
Also in the printer configuration window, you can see some messages showing progress of the print job.
(in ubuntu 11.xx)
(in ubuntu 11.0x)
I think you need to use the web interface for cups, point web browser to http://localhost:631/admin
Then follow a similar sequence to above to create a printer queue.
Now there is a script to try and update ppds of existing print queues, if you are updating c2esp
$ sudo make forceppd
(in ubuntu 11.10)
c2esp is included in this disto, so the printer should just work
(you may need to create print queue as described for ubuntu 11.0x
Then it should be possible for you to print.
SIXTY FOUR BIT
------
There are two ways that I know to install in 64 bit.
There are three ways that I know to install in 64 bit.
1. This way is potentially the easiest, I have not tested it: jolting, made a repository with version c2esp08 (pretty much the same as the latest c2esp11, except no duplex option) Install it like this in terminal: sudo add-apt-repository ppa:jolting/cupsdriverkodak sudo apt-get update sudo apt-get install c2esp
2. You download the latest tar file (currently c2esp11) and extract it somewhere convenient for you then make and install it. You can find instructions in the extracted tar file, or in some other topics in help. Also you can find some tips from people who have done this in other topics in help.
2. You download the latest tar file (currently c2esp23) and extract it somewhere convenient for you then make and install it. You can find instructions in the extracted tar file, or in some other topics in help. Also you can find some tips from people who have done this in other topics in help.
3. Debian and Ubuntu now include c2esp as an installable package.
DEBIAN NOTES
------------
......
INSTALLATION
------------
(Debian and ubuntu now have packages in repositories you can install)
There may be a more recent version available as a .deb file on sourceforge.
There may be a more recent source code version available as a .tar.gz file on sourceforge.
The general procedure will be like this if you compile from source.
(see below for details for different distros):
......@@ -107,6 +109,7 @@ Create printers:
From c2esp11 and later there is more than one ppd file: model 5200 has no duplex, model 5500 has duplex.
From c2esp13 and later there are 4 ppd files 5200 non duplex / 5500 duplex, dithered / non dithered
Select the file that best matches your printer model. Dithered is better quality, uses more memory and is slower.
From c2esp18 and later there is one ppd per printer model. Dithered/non dithered are choices in the colour options.
Click "Forward" and wait again for the "Describe printer" window.
Change the names if you wish, and click the "Apply" button.
Print test page if you wish, but you might do this first:
......@@ -115,22 +118,27 @@ Create printers:
I generally make 2 printers, one colour and one b/w. But that's not essential.
Also in the printer configuration window, you can see some messages showing progress of the print job.
(in ubuntu 11.xx)
(in ubuntu 11.0x)
I think you need to use the web interface for cups, point web browser to http://localhost:631/admin
Then follow a similar sequence to above to create a printer queue.
Now there is a script to try and update ppds of existing print queues, if you are updating c2esp
$ sudo make forceppd
(in ubuntu 11.10)
c2esp is included in this disto, so the printer should just work
(you may need to create print queue as described for ubuntu 11.0x
Then it should be possible for you to print.
SIXTY FOUR BIT
------
There are two ways that I know to install in 64 bit.
There are three ways that I know to install in 64 bit.
1. This way is potentially the easiest, I have not tested it: jolting, made a repository with version c2esp08 (pretty much the same as the latest c2esp11, except no duplex option) Install it like this in terminal: sudo add-apt-repository ppa:jolting/cupsdriverkodak sudo apt-get update sudo apt-get install c2esp
2. You download the latest tar file (currently c2esp11) and extract it somewhere convenient for you then make and install it. You can find instructions in the extracted tar file, or in some other topics in help. Also you can find some tips from people who have done this in other topics in help.
2. You download the latest tar file (currently c2esp23) and extract it somewhere convenient for you then make and install it. You can find instructions in the extracted tar file, or in some other topics in help. Also you can find some tips from people who have done this in other topics in help.
3. Debian and Ubuntu now include c2esp as an installable package.
DEBIAN NOTES
------------
......
......@@ -42,11 +42,18 @@ Version "1.4"
HWMargins 3 3 3 3 //1mm all round
option "MediaSize" PickOne AnySetup 30
MediaSize Executive
MediaSize Letter
MediaSize Legal
*MediaSize A4 // is default A4 allowed?
*MediaSize A4
MediaSize A5
MediaSize A6
MediaSize 8x10
MediaSize Photo4x6
MediaSize EnvISOB5
MediaSize EnvC5
MediaSize DL
MediaSize Env10
option "Resolution" PickOne AnySetup 20
//Resolution colorspace bits-per-color row-count row-feed row-step name
......@@ -67,12 +74,16 @@ Version "1.4"
Attribute "marker-colors" "" "black magenta"
option "ColourModel" PickOne AnySetup 10
option "ColorModel" PickOne AnySetup 10
//ColorModel name colorspace colororder compression
*Choice CMYK/ColorDithered "<</cupsBitsPerColor 8/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 6/cupsColorOrder 0/cupsCompression 1>>setpagedevice"
Choice CMYKND/ColorNonDithered "<</cupsBitsPerColor 2/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 6/cupsColorOrder 1/cupsCompression 1>>setpagedevice"
Choice Gray/BlackAndWhite "<</cupsBitsPerColor 1/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3/cupsColorOrder 0/cupsCompression 1>>setpagedevice"
// *ColorModel CMYK/ColorDithered "<</cupsBitsPerColor 8/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 6/cupsColorOrder 0/cupsCompression 1>>setpagedevice"
// ColorModel CMYKND/ColorNonDithered "<</cupsBitsPerColor 2/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 6/cupsColorOrder 1/cupsCompression 1>>setpagedevice"
// ColorModel Gray/BlackAndWhite "<</cupsBitsPerColor 1/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3/cupsColorOrder 0/cupsCompression 1>>setpagedevice"
// Kodak ESP 3xxx Series non-dithered/dithered without duplex
{
ModelName "Kodak ESP 3200 Series AiO"
......@@ -121,7 +132,7 @@ Version "1.4"
Duplex rotated
}
// Kodak ESP 72xx Series non-dithered/dithered with duplex
// Kodak ESP 72xx Series non-dithered/dithered with duplex and photo tray
{
ModelName "Kodak ESP 7200 Series AiO"
Attribute NickName "" "Kodak ESP 7200" //The NickName is used in ubuntu to make the printer database
......@@ -131,9 +142,11 @@ Version "1.4"
PCFileName "KESP72xx.ppd"
ModelNumber 7250
Duplex rotated
InputSlot 0 MainTray
InputSlot 1 PhotoTray
}
// Kodak ESP 92xx Series non-dithered/dithered with duplex
// Kodak ESP 92xx Series non-dithered/dithered with duplex and photo tray
{
ModelName "Kodak ESP 9200 Series AiO"
Attribute NickName "" "Kodak ESP 9200" //The NickName is used in ubuntu to make the printer database
......@@ -143,6 +156,8 @@ Version "1.4"
PCFileName "KESP92xx.ppd"
ModelNumber 9250
Duplex rotated
InputSlot 0 MainTray
InputSlot 1 PhotoTray
}
}
......
//
//
// Driver info file for PPDs. Just for ESP Cxxx series
//
//
// Include necessary files...
#include <font.defs>
#include <media.defs>
// Common stuff for all drivers...
Attribute "cupsVersion" "" "1.4"
Attribute "FileSystem" "" "False"
Attribute "LandscapeOrientation" "" "Plus90"
Attribute "TTRasterizer" "" "Type42"
Copyright "Copyright 2011 by Paul Newall"
Font *
Version "1.4"
// Kodak
{
Manufacturer "Kodak"
DriverType custom
ManualCopies Yes
ColorDevice Yes
Throughput 8
Attribute "cupsSNMPSupplies" "" "False" // hope to stop the "may not be connected" message
// HWMargins 0 0 0 0
VariablePaperSize Yes
MinSize 36 36
MaxSize 1080 86400
Filter application/vnd.cups-raster 50 /usr/lib/cups/filter/c2espC
Filter application/vnd.cups-command 50 /usr/lib/cups/filter/command2esp
Attribute "cupsCommands" "" "Clean PrintSelfTestPage PrintAlignmentPage ReportLevels"
ColorDevice Yes
Attribute DefaultColorSpace "" "CMYK"
// HWMargins 14.03 14.25 14.03 14.25 //5mm all round
HWMargins 3 3 3 3 //1mm all round
option "MediaSize" PickOne AnySetup 30
MediaSize Letter
MediaSize Legal
*MediaSize A4
MediaSize A5
MediaSize Photo4x6
option "Resolution" PickOne AnySetup 20
//Resolution colorspace bits-per-color row-count row-feed row-step name
*Choice 300x300dpi/300x300 "<</HWResolution[300 300]/cupsBitsPerColor 8/cupsColorOrder 1>>setpagedevice"
// Choice 600x600dpi/600x600 "<</HWResolution[600 600]>>setpagedevice"
//res/media dens gamma 3x3matrix
ColorProfile 300x300dpi/- 1.0 1.0
1.0 0.0 0.0
0.0 1.0 0.0
0.0 0.0 1.0
ColorProfile 600x600dpi/- 1.0 1.0 //gamma 1.5 to 1.7 was good for dithered in ESP5250
1.0 0.0 0.0
0.0 1.0 0.0
0.0 0.0 1.0
Attribute "marker-colors" "" "black magenta"
option "ColourModel" PickOne AnySetup 10
//ColorModel name colorspace colororder compression
// Choice CMYK/ColorDithered "<</cupsBitsPerColor 8/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 6/cupsColorOrder 0/cupsCompression 1>>setpagedevice"
// Choice CMYKND/ColorNonDithered "<</cupsBitsPerColor 2/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 6/cupsColorOrder 1/cupsCompression 1>>setpagedevice"
*Choice Gray/BlackAndWhite "<</cupsBitsPerColor 8/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3/cupsColorOrder 0/cupsCompression 1>>setpagedevice"
// Kodak ESP Cxxx Series non-dithered/dithered without duplex
{
ModelName "Kodak ESP C100 Series AiO"
Attribute NickName "" "Kodak ESP C100" //The NickName is used in ubuntu to make the printer database
Attribute Product "" "(Kodak ESP C100 Series AiO)"
Attribute 1284DeviceID "" "MFG:Eastman Kodak Company;MDL:KODAK ESP C100 Series AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;"
FileName "Kodak_ESP_C1xx_Series.ppd"
PCFileName "KESPC1xx.ppd"
ModelNumber C100
}
}
//
//
// Driver info file for PPDs. Just for ESP Cxxx series
//
// Driver info file for PPDs. For ESP Cxxx series and for Hero series
//
// Include necessary files...
......@@ -22,7 +21,7 @@ Version "1.4"
// Kodak
{
Manufacturer "Kodak"
Manufacturer "Eastman Kodak"
DriverType custom
ManualCopies Yes
ColorDevice Yes
......@@ -36,24 +35,27 @@ Version "1.4"
Filter application/vnd.cups-command 50 /usr/lib/cups/filter/command2esp
Attribute "cupsCommands" "" "Clean PrintSelfTestPage PrintAlignmentPage ReportLevels"
ColorDevice Yes
// Attribute DefaultColorSpace "" "CMYK"
Attribute DefaultColorSpace "" "CMY"
// HWMargins 14.03 14.25 14.03 14.25 //5mm all round
HWMargins 3 3 3 3 //1mm all round
option "MediaSize" PickOne AnySetup 30
// option "MediaSize" PickOne AnySetup 30
MediaSize Executive
MediaSize Letter
MediaSize Legal
*MediaSize A4
MediaSize A5
MediaSize A6
MediaSize 8x10
MediaSize Photo4x6
MediaSize EnvISOB5
MediaSize EnvC5
MediaSize DL
MediaSize Env10
option "Resolution" PickOne AnySetup 20
//Resolution colorspace bits-per-color row-count row-feed row-step name
// *Choice 300x300dpi/300x300 "<</HWResolution[300 300]/cupsBitsPerColor 8/cupsColorOrder 1>>setpagedevice"
// Choice 600x600dpi/600x600 "<</HWResolution[600 600]/cupsBitsPerColor 8/cupsColorOrder 1>>setpagedevice"
*Choice 300x300dpi/300x300 "<</HWResolution[300 300]/cupsBitsPerColor 8>>setpagedevice"
Choice 600x600dpi/600x600 "<</HWResolution[600 600]/cupsBitsPerColor 8>>setpagedevice"
Choice 300x300dpi/300x300 "<</HWResolution[300 300]/cupsBitsPerColor 8>>setpagedevice"
*Choice 600x600dpi/600x600 "<</HWResolution[600 600]/cupsBitsPerColor 8>>setpagedevice"
//res/media dens gamma 3x3matrix
......@@ -69,23 +71,99 @@ Version "1.4"
Attribute "marker-colors" "" "black magenta"
option "ColourModel" PickOne AnySetup 10
option "ColorModel" PickOne AnySetup 10
//ColorModel name colorspace colororder compression
// Choice CMY/Color "<</cupsBitsPerColor 8/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 6/cupsColorOrder 0/cupsCompression 1>>setpagedevice"
// *Choice Gray/BlackAndWhite "<</cupsBitsPerColor 8/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3/cupsColorOrder 0/cupsCompression 1>>setpagedevice"
ColorModel Gray/Grayscale k chunky 0
*ColorModel CMY/Color cmy chunky 0
// Kodak ESP Cxxx Series without duplex
// Kodak ESP C110 Series without duplex or photo tray
{
ModelName "Kodak ESP C110 Series AiO"
Attribute NickName "" "Kodak ESP C110" //The NickName is used in ubuntu to make the printer database
Attribute Product "" "(Kodak ESP C110 Series AiO)"
Attribute 1284DeviceID "" "MFG:Eastman Kodak Company;MDL:KODAK ESP C110 Series AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;"
FileName "Kodak_ESP_C11x_Series.ppd"
PCFileName "KESPC11x.ppd"
ModelNumber C110
}
// Kodak ESP C310 Series without duplex or photo tray
{
ModelName "Kodak ESP C310 Series AiO"
Attribute NickName "" "Kodak ESP C310" //The NickName is used in ubuntu to make the printer database
Attribute Product "" "(Kodak ESP C310 Series AiO)"
Attribute 1284DeviceID "" "MFG:Eastman Kodak Company;MDL:KODAK ESP C310 Series AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;"
FileName "Kodak_ESP_C31x_Series.ppd"
PCFileName "KESPC31x.ppd"
ModelNumber C310
}
// Kodak ESP Hero Series without duplex or photo tray
{
ModelName "Kodak ESP C100 Series AiO"
Attribute NickName "" "Kodak ESP C100" //The NickName is used in ubuntu to make the printer database
Attribute Product "" "(Kodak ESP C100 Series AiO)"
Attribute 1284DeviceID "" "MFG:Eastman Kodak Company;MDL:KODAK ESP C100 Series AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;"
FileName "Kodak_ESP_C1xx_Series.ppd"
PCFileName "KESPC1xx.ppd"
ModelNumber C100
ModelName "KODAK HERO 3.1 AiO"
Attribute NickName "" "KODAK HERO 3.1 AiO" //The NickName is used in ubuntu to make the printer database
Attribute Product "" "(KODAK HERO 3.1 AiO)"
Attribute 1284DeviceID "" "MFG:Eastman Kodak Company;MDL:KODAK HERO 3.1 AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;"
FileName "Kodak_Hero_3.1.ppd"
PCFileName "KHERO31.ppd"
ModelNumber Hero3.1
}
// Kodak ESP Hero Series with duplex and without photo tray
{
ModelName "KODAK HERO 5.1 AiO"
Attribute NickName "" "KODAK HERO 5.1 AiO" //The NickName is used in ubuntu to make the printer database
Attribute Product "" "(KODAK HERO 5.1 AiO)"
Attribute 1284DeviceID "" "MFG:Eastman Kodak Company;MDL:KODAK HERO 5.1 AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;"
FileName "Kodak_Hero_5.1.ppd"
PCFileName "KHERO51.ppd"
ModelNumber Hero5.1
Duplex rotated
}
// Kodak ESP Hero Series with duplex and photo tray. 6.1, 7.1, 9.1
{
ModelName "KODAK HERO 6.1 AiO"
Attribute NickName "" "KODAK HERO 6.1 AiO" //The NickName is used in ubuntu to make the printer database
Attribute Product "" "(KODAK HERO 6.1 AiO)"
Attribute 1284DeviceID "" "MFG:Eastman Kodak Company;MDL:KODAK HERO 6.1 AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;"
FileName "Kodak_Hero_6.1.ppd"
PCFileName "KHERO61.ppd"
ModelNumber Hero6.1
Duplex rotated
InputSlot 0 MainTray
InputSlot 1 PhotoTray
}
// Kodak ESP Hero Series with duplex and photo tray. 6.1, 7.1, 9.1
{
ModelName "KODAK HERO 7.1 AiO"
Attribute NickName "" "KODAK HERO 7.1 AiO" //The NickName is used in ubuntu to make the printer database
Attribute Product "" "(KODAK HERO 7.1 AiO)"
Attribute 1284DeviceID "" "MFG:Eastman Kodak Company;MDL:KODAK HERO 7.1 AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;"
FileName "Kodak_Hero_7.1.ppd"
PCFileName "KHERO71.ppd"
ModelNumber Hero9.1
Duplex rotated
InputSlot 0 MainTray
InputSlot 1 PhotoTray
}
// Kodak ESP Hero Series with duplex and photo tray. 6.1, 7.1, 9.1
{
ModelName "KODAK HERO 9.1 AiO"
Attribute NickName "" "KODAK HERO 9.1 AiO" //The NickName is used in ubuntu to make the printer database
Attribute Product "" "(KODAK HERO 9.1 AiO)"
// MFG:Eastman Kodak Company;MDL:KODAK HERO 9.1 AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;SN:Z004009;
Attribute 1284DeviceID "" "MFG:Eastman Kodak Company;MDL:KODAK HERO 9.1 AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;"
FileName "Kodak_Hero_9.1.ppd"
PCFileName "KHERO91.ppd"
ModelNumber Hero9.1
Duplex rotated
InputSlot 0 MainTray
InputSlot 1 PhotoTray
}
}
......@@ -170,8 +170,8 @@ c2esp: c2esp.o c2espcommon.o $(LIBJBG85)
c2espC: c2espC.o c2espcommon.o
$(CC) $(CFLAGS) -o $@ c2espC.o c2espcommon.o -lcupsimage -lcups -lcupsdriver -lz
command2esp: command2esp.o
$(CC) $(CFLAGS) -o $@ command2esp.o -lcups -lcupsdriver
command2esp: command2esp.o c2espcommon.o
$(CC) $(CFLAGS) -o $@ command2esp.o c2espcommon.o -lcups -lcupsdriver
myopldecode: myopldecode.o $(LIBJBG)
$(CC) $(CFLAGS) -o $@ $@.o $(LIBJBG) -lz
......@@ -183,9 +183,8 @@ install: all install-test install-prog install-ppd install-doc
# Now use your printer configuration GUI to create a new printer.
#
# ESP Cxxx SUPPORT NOW INCLUDED FOR MONO & COLOUR, 300DPI & 600DPI
# Note that the ESP Cxxx support is a new feature and is untested
# So it is not likely that it will work correctly. Please report
# ESP Cxxx and Hero SUPPORT NOW INCLUDED FOR MONO & COLOUR, 300DPI & 600DPI
# Note that the ESP Cxxx and Hero support is a new feature. Please report
# how it works / does not work in the help forum.
# http://sourceforge.net/projects/cupsdriverkodak/forums
#
......@@ -317,12 +316,14 @@ jbig85.o: jbig85.h
c2esp.o: jbig85.h c2espcommon.h
#c2espC.o: zlib.h
myopldecode.o: jbig.h
command2esp.o: c2espcommon.h
#
# PPD files
#
ppd:
ppd: KodakESP_10.drv KodakESP_C_05.drv
#
# Generate PPD files using local tools
#
ppdc KodakESP_10.drv
ppdc KodakESP_C_05.drv
......@@ -5,6 +5,22 @@ Readme file for Kodak ESP 5xxx cups driver.
VERSION NOTES
Version 2.3
- ppd files for the hero series had printer model names and 1284DeviceID changed to enable system-config-printer to find the correct ppd automatically. The ESP xxxx series also install automatically. I do not know the 1284DeviceID for the ESP Cxxx series yet.
- This version will be released also as a .deb file. It should work pretty well for all 3 series (ESP xxxx, ESP Cxxx, Hero)
Version 2.2
- A few bugs fixed. ppd files were not showing color options correctly. Some attempts made to speed up printing by removing unnecessary delays.
Version 2.2~rc1
- I now have a Hero 9.1 printer, so I can test the c2espC filter. This version should now work in b/w and colour 300 and 600dpi on the Cxxx series and the Hero series.
- More ppd files to match the different printers. More paper sizes added to the ppds and filters.
- The duplex and photo paper tray on the Hero series (and perhaps others like ESP 7250?) should now work.
- Added "make ppd" to the make file to generate the ppd files from the *.drv files using ppdc if you have it installed. Though the ppd files are already included in the source, so you only need this if you modify them.
Version 2.1
- as 2.1~rc3 Making deb file too.
Version 2.1~rc3
- significant changes from rc2. Some functions common to c2esp and c2espC are now in a common library (c2espcommon.c). The log entries have been made more detailed and neater. In c2espC the temporary file for holding the compressed data is now a system named file that should not persist after c2espC terminates.
- c2espC filter (for the C series) now attempts to handle greyscale or colour at 300dpi or 600dpi, but I have no Cxxx printer so I cannot test it fully.
......
......@@ -5,6 +5,22 @@ Readme file for Kodak ESP 5xxx cups driver.
VERSION NOTES
Version 2.3
- ppd files for the hero series had printer model names and 1284DeviceID changed to enable system-config-printer to find the correct ppd automatically. The ESP xxxx series also install automatically. I do not know the 1284DeviceID for the ESP Cxxx series yet.
- This version will be released also as a .deb file. It should work pretty well for all 3 series (ESP xxxx, ESP Cxxx, Hero)
Version 2.2
- A few bugs fixed. ppd files were not showing color options correctly. Some attempts made to speed up printing by removing unnecessary delays.
Version 2.2~rc1
- I now have a Hero 9.1 printer, so I can test the c2espC filter. This version should now work in b/w and colour 300 and 600dpi on the Cxxx series and the Hero series.
- More ppd files to match the different printers. More paper sizes added to the ppds and filters.
- The duplex and photo paper tray on the Hero series (and perhaps others like ESP 7250?) should now work.
- Added "make ppd" to the make file to generate the ppd files from the *.drv files using ppdc if you have it installed. Though the ppd files are already included in the source, so you only need this if you modify them.
Version 2.1
- as 2.1~rc3 Making deb file too.
Version 2.1~rc3
- significant changes from rc2. Some functions common to c2esp and c2espC are now in a common library (c2espcommon.c). The log entries have been made more detailed and neater. In c2espC the temporary file for holding the compressed data is now a system named file that should not persist after c2espC terminates.
- c2espC filter (for the C series) now attempts to handle greyscale or colour at 300dpi or 600dpi, but I have no Cxxx printer so I cannot test it fully.
......
This diff is collapsed.
......@@ -31,7 +31,7 @@ if [ "$1" = "configure" ]; then
which lpadmin > /dev/null 2>&1 && \
LC_ALL=C lpstat -h /var/run/cups/cups.sock -r | grep -v not > /dev/null 2>&1; then
# Update the PPD files of all already installed print queues
# driverregexp='c2esp:'
# Line below was driverregexp='c2esp:' changed to work with c2espC also
driverregexp='c2esp'
gennicknameregexp=''
[ ! -z "$gennicknameregexp" ] && \
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -37,6 +37,7 @@ int BackBufLen=sizeof(BackBuf)-1;
FILE *LogFile = NULL; //file descriptor for log file
*/
char BackBuf[32000]; //for the back channel replies from the printer
int ColourPercent, BlackPercent; //to store the detected marker levels
void SetupLogging(char *ExtCallerName, int ExtDoBack, char *ExtLogFileName);
......@@ -64,7 +65,7 @@ int GoodExchange(FILE *PrintFile, char *Command, char *Expect, int DoBack, unsi
int MarkerPercent(char *Buf, int GetColour); /* GetColour = 1 for "Color" or 0 for "Black" */
void MarkerSetup();
void SetPaperSize(char Size[], int PaperPoints);
//converts length of page in cups header (in points) into a string that the printer recognises
......
#!/bin/sh
# script for c2esp, extracts c2esp entries from the cups error log
# This is just a time saver for developers
grep c2esp /var/log/cups/error_log
......@@ -38,92 +38,14 @@ Maintenance=003?
#include <fcntl.h> //files
#include <time.h> //time functions used for debugging
#include <sys/stat.h> //chmod
#include "c2espcommon.h" //the common library
time_t StartTime;
FILE *LogFile = NULL; //file descriptor for log file
//FILE *LogFile = NULL; //file descriptor for log file
FILE *PrintFile = NULL; //file descriptor for debug file
char BackBuf[32000]; //for the back channel replies from the printer
int BackBufLen=sizeof(BackBuf)-1,
DoBack=1; /* Enables the back channel comms */
/* void
HandleReply()
{
int BytesRead, i;
char BackBuf[60], Display[60];
int BackBufLen=60;
float ReplyTime=2.0;
fflush(stdout); //force a packet to the printer so it can reply
sleep(30); //to allow time for reply
BytesRead = cupsBackChannelRead(BackBuf, BackBufLen, ReplyTime); //read the reply from printer
if(BytesRead >= 1) BackBuf[BytesRead]=0; //add null terminator NB BytesRead==-1 if nothing read
for(i=0;i<59;++i) Display[i] = BackBuf[i]; //copy the first 39 chars to Display
Display[59] = 0; //add null terminator
fprintf(stderr, "INFO: c2esp: Got %d byte reply = %s\n", BytesRead, Display);
}
*/
/* DoLog used during development */
void DoLog(char *PrintFormat, int I1, int I2)
{
//prints a line with 2 integers to the log file
if (LogFile == NULL)
return;
char LogFormat[100];
strcpy(LogFormat, "%d : ");
strcat(LogFormat,PrintFormat);
fprintf(LogFile, LogFormat, time(NULL)-StartTime, I1, I2);
}
void DoLogString(char *PrintFormat, char *String)
{
//prints a line with a string to the log file
if (LogFile == NULL)
return;
char LogFormat[100];
strcpy(LogFormat, "%d : ");
strcat(LogFormat,PrintFormat);
fprintf(LogFile, LogFormat, time(NULL)-StartTime, String);
}
/* GoodExchange sends a command gets reply from the printer on the back channel and compares it with the expected reply
It returns the number of bytes read if the reply was the one expected,
otherwise 0 if the reply did not match Expect, or -1 if there was no reply */
int GoodExchange(char *Command, char *Expect, int DoBack, char *BackBuf, int BackBufLen, unsigned int SleepTime, float ReplyTime)
{
int BytesRead = 0; //int because cupsBackChannel can return -1
char Display[60];
int i;
fprintf(stderr, "c2esp: Sent command = %s\n", Command);
DoLogString("Sent command = %s\n", Command);
if(PrintFile) fprintf(PrintFile, "%s", Command); //to the global print file
#if TESTING == 0
fprintf(stdout, "%s", Command); //printer command
#endif
fflush(stdout); //force a packet to the printer so it can reply
sleep(SleepTime); //give it a chance to reply before trying to read the reply (may not be needed)
if(DoBack)
{
BytesRead = cupsBackChannelRead(BackBuf, BackBufLen, ReplyTime); //read the reply from printer
if(BytesRead >= 1) BackBuf[BytesRead]=0; //add null terminator NB BytesRead==-1 if nothing read
for(i=0;i<59;++i) Display[i] = BackBuf[i]; //copy the first 39 chars to Display
Display[59] = 0; //add null terminator
fprintf(stderr, "DEBUG: c2esp: Got %d byte reply = %s\n", BytesRead, Display);
DoLog("Got %d byte reply\n", BytesRead, 0);
if(strncmp(BackBuf, Expect, strlen(Expect)) != 0)
{
fprintf(stderr, "DEBUG: c2esp: wrong reply = %s\n", Display);
DoLogString("Unexpected reply = %s\n", Display);
return(0);
}
else DoLogString("Reply = %s\n", Display);
}
return(BytesRead);
}
//char BackBuf[32000]; //for the back channel replies from the printer
//int BackBufLen=sizeof(BackBuf)-1,
int DoBack=1; /* Enables the back channel comms */
time_t KeepAwake(time_t Start, int Interval)
......@@ -133,7 +55,7 @@ time_t KeepAwake(time_t Start, int Interval)
if(time(NULL) - Start > Interval)
{
DoLog("Keeping printer awake by DeviceStatus?\n",0,0);
GoodExchange("DeviceStatus?", "0101,DeviceStatus.ImageDevice", DoBack, BackBuf, BackBufLen, 1, 1.0);
GoodExchange(PrintFile, "DeviceStatus?", "0101,DeviceStatus.ImageDevice", DoBack, 1, 1.0);
return (time(NULL));
}
else return (Start);
......@@ -154,34 +76,6 @@ KeepAwakeFor(int Duration, int Interval)
}
}
int
MarkerPercent(char *Buf, int GetColour) /* GetColour = 1 for "Color" or 0 for "Black" */
{
/* search for the ink data in the buffer using char *strstr(char *string2, char string*1);*/
char *MarkerLevelString;
if(GetColour) MarkerLevelString = strstr(Buf, "DeviceStatus.Printer.InkLevelPercent.Color=");
else MarkerLevelString = strstr(Buf, "DeviceStatus.Printer.InkLevelPercent.Black=");
if (MarkerLevelString)
{
MarkerLevelString = strstr(MarkerLevelString, "=")+1;
if (MarkerLevelString)
{
if(strncmp(MarkerLevelString,"F",1)==0) return (100);
else return (atoi(MarkerLevelString));
}
}
return 0;
}
void
MarkerSetup()
{
fprintf(stderr, "ATTR: marker-colors=black,magenta\n"); //displays ink drops in printer manager
fprintf(stderr, "ATTR: marker-names=black,colour\n");
}
/*
* 'main()' - Main entry and processing of driver.
*/
......@@ -193,20 +87,15 @@ main(int argc, /* I - Number of command-line arguments */
FILE *fp; /* Command file */
char line[1024], /* Line from file */
*lineptr; /* Pointer into line */
ppd_file_t *ppd; /* PPD file */
int BlackPercent, ColourPercent;
int StatusLength;
fputs("INFO: command2esp running\n", stderr);
StartTime = time(NULL);
#if DEBUGFILES == 1
//fix this log file
chmod("/tmp/KodakCommandLog", S_IRUSR | S_IWUSR | S_IROTH ); //let anyone read it
remove("/tmp/KodakCommandLog"); //to be sure I only see the latest
LogFile = fopen("/tmp/KodakCommandLog", "w"); //open the log file
setbuf(LogFile, NULL);
fprintf(LogFile, "KodakCommandLog c2esp\n");
SetupLogging("c2espCommand",DoBack,"/tmp/KodakCommandLog");
#else
SetupLogging("c2espCommand",DoBack,"");
#endif
/*
......@@ -224,15 +113,6 @@ main(int argc, /* I - Number of command-line arguments */
return (1);
}
/*
* Open the PPD file... Is this needed?
*/
if ((ppd = ppdOpenFile(getenv("PPD"))) == NULL)
{
fputs("ERROR: Unable to open PPD file!\n", stderr);
return (1);
}
/*
* Open the command file as needed...
......@@ -283,8 +163,8 @@ main(int argc, /* I - Number of command-line arguments */
{
/* Clean heads...*/
fputs("INFO: command2esp Clean print head\n", stderr);
fprintf(LogFile, "Clean print head\n");
GoodExchange("Maintenance=003?", "0096, OK, Maintenance Started;", DoBack, BackBuf, BackBufLen, 1, 1.0);
DoLog("Clean print head\n",0,0);
GoodExchange(PrintFile, "Maintenance=003?", "0096, OK, Maintenance Started;", DoBack, 1, 1.0);
KeepAwakeFor(80,10);
}
......@@ -293,16 +173,18 @@ main(int argc, /* I - Number of command-line arguments */
/* Print alignment page...*/
fputs("INFO: command2esp Print alignment page\n", stderr);
fprintf(LogFile, "Print alignment page\n");
GoodExchange("Maintenance=006?", "0096, OK, Maintenance Started;", DoBack, BackBuf, BackBufLen, 1, 1.0);
DoLog("Print alignment page\n",0,0);
GoodExchange(PrintFile, "Maintenance=006?", "0096, OK, Maintenance Started;", DoBack, 1, 1.0);
KeepAwakeFor(80,10);
}
else if (strncasecmp(lineptr, "PrintSelfTestPage", 17) == 0)
{
fputs("INFO: command2esp Print Self Test Page\n", stderr);
fprintf(LogFile, "Print Self Test Page\n");
GoodExchange("Maintenance=002?", "0096, OK, Maintenance Started;", DoBack, BackBuf, BackBufLen, 1, 1.0);
DoLog("Print Self Test Page\n",0,0);
GoodExchange(PrintFile, "Maintenance=002?", "0096, OK, Maintenance Started;", DoBack, 1, 1.0);
// Hero 9.1 does not need to be kept awake. ESP 5250 does?
//sleep(80); //did not work for ESP 5250
KeepAwakeFor(80,15);
}
......@@ -310,27 +192,24 @@ main(int argc, /* I - Number of command-line arguments */
{
/* Report ink levels... */
StatusLength=abs(GoodExchange("DeviceStatus?", "0101,DeviceStatus.ImageDevice", DoBack, BackBuf, BackBufLen, 1, 1.0));
StatusLength=abs(GoodExchange(PrintFile, "DeviceStatus?", "0101,DeviceStatus.ImageDevice", DoBack, 1, 1.0));
DoLog("StatusLength=%d\n",StatusLength,0);
/* you can get unexpected reply if there is an ink low warning then GoodExchange will be -ve */
/* aquire ink levels here? DeviceStatus.Printer.InkLevelPercent.Colour=nn%&DeviceStatus.Printer.InkLevelPercent.Black=nn% */
if(StatusLength>0)
{
ColourPercent = MarkerPercent(BackBuf,1);
BlackPercent = MarkerPercent(BackBuf,0);
DoLog("ColourPercent=%d\n",ColourPercent,0);