Commit 964f2b3d authored by Didier Raboud's avatar Didier Raboud

Imported Upstream version 25a

parent 441cf11a
......@@ -134,7 +134,7 @@ Create printers:
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)
(in ubuntu 11.10 and later)
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
......@@ -146,7 +146,7 @@ SIXTY FOUR 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 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.
2. You download the latest tar file (currently c2esp25) 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.
......@@ -187,9 +187,11 @@ DEVELOPER AND DEBUGGING TIPS
In /etc/cups/cupsd.conf
Change LogLevel warn to LogLevel debug to get much more information in /var/log/cups/error_log
If you compile with the flag -g you can subsequently use the debugger gdb to locate run time errors.
But I'm not sure how you do this when c2esp is generally launched by cups and not run directly by the user.
All the logging output that would go into the file KodakPrintLog now goes into cups/error_log.
This allows users who install a binary package to get logging data without needing to recompile.
Since cups/error_log gets quite large,
the command c2esplog is provided to extract the lines relevant to c2esp from cups/error_log.
......@@ -124,7 +124,7 @@ Create printers:
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)
(in ubuntu 11.10 and later)
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
......@@ -136,7 +136,7 @@ SIXTY FOUR 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 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.
2. You download the latest tar file (currently c2esp25) 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.
......@@ -177,9 +177,11 @@ DEVELOPER AND DEBUGGING TIPS
In /etc/cups/cupsd.conf
Change LogLevel warn to LogLevel debug to get much more information in /var/log/cups/error_log
If you compile with the flag -g you can subsequently use the debugger gdb to locate run time errors.
But I'm not sure how you do this when c2esp is generally launched by cups and not run directly by the user.
All the logging output that would go into the file KodakPrintLog now goes into cups/error_log.
This allows users who install a binary package to get logging data without needing to recompile.
Since cups/error_log gets quite large,
the command c2esplog is provided to extract the lines relevant to c2esp from cups/error_log.
//
//
// Driver info file for PPDs.
//
// Version for all dithered filter
//
// Include necessary files...
......@@ -14,7 +14,7 @@ Attribute "FileSystem" "" "False"
Attribute "LandscapeOrientation" "" "Plus90"
Attribute "TTRasterizer" "" "Type42"
Copyright "Copyright 2011 by Paul Newall"
Copyright "Copyright 2011-2012 by Paul Newall"
Font *
......@@ -28,7 +28,6 @@ Version "1.4"
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
......@@ -38,7 +37,6 @@ Version "1.4"
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
......@@ -57,32 +55,49 @@ Version "1.4"
option "Resolution" PickOne AnySetup 20
//Resolution colorspace bits-per-color row-count row-feed row-step name
Choice 300x1200dpi/300x1200 "<</HWResolution[300 1200]/cupsBitsPerColor 1/cupsColorOrder 1>>setpagedevice"
*Choice 600x1200dpi/600x1200 "<</HWResolution[600 1200]>>setpagedevice"
Choice 300x1200dpi/300x1200 "<</HWResolution[300 1200]/cupsBitsPerColor 8/>>setpagedevice"
*Choice 600x1200dpi/600x1200 "<</HWResolution[600 1200]/cupsBitsPerColor 8/>>setpagedevice"
//res/media dens gamma 3x3matrix
ColorProfile 300x1200dpi/- 1.0 1.0
1.0 0.0 0.0
-0.2 1.0 0.0
0.0 -0.4 1.0
//res/media dens gamma 3x3matrix
// input
// C M Y
// o C 1 0 0
// u M 0 1 0
// t Y 0 0 1
ColorProfile 600x1200dpi/- 1.0 1.5 //gamma 1.5 to 1.7 is good for dithered
ColorProfile 300x1200dpi/- 1.0 1.0
1.0 0.0 0.0
-0.2 1.0 0.0
-0.1 1.0 0.0
0.0 -0.3 1.0
ColorProfile 600x1200dpi/- 1.0 1.4 //gamma above 1.0 works for 600dpi
1.0 -0.1 0.0
-0.1 1.0 0.0
0.0 -0.4 1.0
// Plain mapping for calibration tests
// ColorProfile 300x1200dpi/- 1.0 1.0
// 1.0 0.0 0.0
// 0.0 1.0 0.0
// 0.0 0.0 1.0
// ColorProfile 600x1200dpi/- 1.0 1.7 //gamma 1.5 to 1.7 is good for dithered
// 1.0 0.0 0.0
// 0.0 1.0 0.0
// 0.0 0.0 1.0
Attribute cupsInkChannels "" "4"
Attribute cupsInkLimit "" "2.0"
Attribute cupsBlackGeneration "" "0.0 0.0"
Attribute "marker-colors" "" "black magenta"
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"
ColorModel RGB/Color rgb chunky 0
ColorModel Gray/BlackAndWhite k chunky 0
// Kodak ESP 3xxx Series non-dithered/dithered without duplex
{
......
//
//
// Driver info file for PPDs. For ESP Cxxx series and for Hero series
// ver 06 21xx printers added
//
// Include necessary files...
#include <font.defs>
......@@ -78,17 +78,6 @@ Version "1.4"
ColorModel Gray/Grayscale k chunky 0
*ColorModel CMY/Color cmy chunky 0
// Kodak ESP 21xx Series without duplex or photo tray
{
ModelName "Kodak ESP 2100 Series AiO"
Attribute NickName "" "Kodak ESP 2100" //The NickName is used in ubuntu to make the printer database
Attribute Product "" "(Kodak ESP 2100 Series AiO)"
Attribute 1284DeviceID "" "MFG:Eastman Kodak Company;MDL:KODAK ESP 2100 Series AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;"
FileName "Kodak_ESP_21xx_Series.ppd"
PCFileName "KESP21xx.ppd"
ModelNumber 2100
}
// Kodak ESP C110 Series without duplex or photo tray
{
ModelName "Kodak ESP C110 Series AiO"
......
......@@ -5,6 +5,7 @@
# Makefile for c2esp19 has myopldecode compiled but no longer installed
# Makefile for c2esp20 has some redundant stuff deleted, ppd file names are echoed, c2espC added
# Makefile for c2esp21 has forceppd added
# Makefile for c2esp25 has minor changes. (*.in files are deleted from the doc directory)
LANG=C
UNAME := $(shell uname)
......@@ -182,9 +183,11 @@ myopldecode: myopldecode.o $(LIBJBG)
#
install: all install-test install-prog install-ppd install-doc
#
# Now use your printer configuration GUI to create a new printer.
#
# help forum.
# ESP Cxxx and Hero SUPPORT NOW INCLUDED FOR MONO & COLOUR, 300DPI & 600DPI
# Please report problems in the help forum.
# http://sourceforge.net/projects/cupsdriverkodak/forums
#
......@@ -254,10 +257,13 @@ install-doc: doc
#
# Install documentation
#
rm -f $(DOCDIR)/INSTALL.in
rm -f $(DOCDIR)/README.in
$(INSTALL) -d -m 755 $(DOCDIR)
$(INSTALL) -c -m 644 COPYING $(DOCDIR)
$(INSTALL) -c -m 644 INSTALL $(DOCDIR)
$(INSTALL) -c -m 644 README $(DOCDIR)
$(INSTALL) -c -m 644 c2esp.txt $(DOCDIR)
# make README file from README.in just copy and make read only
README: README.in
......@@ -282,16 +288,14 @@ INSTALL: INSTALL.in Makefile
# Uninstall
#
uninstall:
# -rm -f $(MANDIR)/man1/arm2hpdl.1 $(MANDIR)/man1/usb_printerid.1
-rm -rf $(PPDDIR)
-rm -f $(BIN)/myopldecode
-rm -f $(BIN)/c2esp
# -rm -f $(BIN)/cupslog
-rm -f $(BIN)/c2esplog
-rm -f $(FILTERBIN)/c2esp
-rm -f $(FILTERBIN)/c2espC
# done
#remove any compessed ppds
#remove any compressed ppds
cd ppd; for ppdfile in *.ppd; do \
rm -f $(MODEL)/$$ppdfile.gz; \
done;
......@@ -313,16 +317,17 @@ clean:
jbig.o: jbig.h
jbig85.o: jbig85.h
c2esp.o: jbig85.h c2espcommon.h
#c2espC.o: zlib.h
c2espC.o: c2espcommon.h
myopldecode.o: jbig.h
command2esp.o: c2espcommon.h
c2espcommon.o: c2espcommon.h
#
# PPD files
#
ppd: KodakESP_10.drv KodakESP_C_06.drv
ppd: KodakESP_13.drv KodakESP_C_05.drv
#
# Generate PPD files using local tools
#
ppdc KodakESP_10.drv
ppdc KodakESP_C_06.drv
ppdc KodakESP_13.drv
ppdc KodakESP_C_05.drv
Readme file for Kodak ESP 5xxx cups driver.
==============================================
Readme file for Kodak ESP series and Hero series cups driver.
=============================================================
Please read the "INSTALL" file to see how to install this software.
VERSION NOTES
Version 2.5a
- As 2.5 but the data chunk size limit was reinstated.
Version 2.5
- The c2esp filter for the ESP series has been significantly rewritten to enable some ppd attributes like cupsInkLimit and cupsBlackGeneration.
- The grey ink is now used. This makes grey areas properly grey (less green than they used to be).
- Because of the grey ink and cupsInkLimit, ink cartridges should last longer.
- The Black&White option is now dithered properly (and also uses the grey ink).
- The data chunk size limit was unintentionally left out.
Version 2.4
- patch from user awl29 applied to fix problems with non bi-directional printers, smb shared
- data chunk size limit applied, some printers can't handle large data chunks.
- patch from user awl29 applied to fix problems with non bi-directional printers, smb shared - data chunk size limit applied in c2espC, some printers can't handle large data chunks.
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.
......@@ -28,7 +37,7 @@ Version 2.1
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.
- a script now called c2esplog is provided to extract entries for c2esp or c2espC from the cups error log. Type c2esplog in terminal to see the log entries, or c2esplog >yourfilename to save in a file.
- a script now called c2esplog is provided to extract entries for c2esp or c2espC from the cups error log. Type cupslog in terminal to see the log entries, or cupslog >yourfilename to save in a file.
Version 2.1~rc2
- c2espC filter (for the C series) now attempts to handle greyscale or colour at 300dpi or 600dpi. Several bugs have been fixed, but I have no Cxxx printer so I cannot test it fully.
......
Readme file for Kodak ESP 5xxx cups driver.
==============================================
Readme file for Kodak ESP series and Hero series cups driver.
=============================================================
Please read the "INSTALL" file to see how to install this software.
VERSION NOTES
Version 2.5a
- As 2.5 but the data chunk size limit was reinstated.
Version 2.5
- The c2esp filter for the ESP series has been significantly rewritten to enable some ppd attributes like cupsInkLimit and cupsBlackGeneration.
- The grey ink is now used. This makes grey areas properly grey (less green than they used to be).
- Because of the grey ink and cupsInkLimit, ink cartridges should last longer.
- The Black&White option is now dithered properly (and also uses the grey ink).
- The data chunk size limit was unintentionally left out.
Version 2.4
- patch from user awl29 applied to fix problems with non bi-directional printers, smb shared
- data chunk size limit applied, some printers can't handle large data chunks.
- patch from user awl29 applied to fix problems with non bi-directional printers, smb shared - data chunk size limit applied in c2espC, some printers can't handle large data chunks.
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.
......@@ -28,7 +37,7 @@ Version 2.1
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.
- a script now called c2esplog is provided to extract entries for c2esp or c2espC from the cups error log. Type c2esplog in terminal to see the log entries, or c2esplog >yourfilename to save in a file.
- a script now called c2esplog is provided to extract entries for c2esp or c2espC from the cups error log. Type cupslog in terminal to see the log entries, or cupslog >yourfilename to save in a file.
Version 2.1~rc2
- c2espC filter (for the C series) now attempts to handle greyscale or colour at 300dpi or 600dpi. Several bugs have been fixed, but I have no Cxxx printer so I cannot test it fully.
......
This diff is collapsed.
File mode changed from 100644 to 100755
Information document for the c2esp filter.
==========================================
This is a cups raster filter to enable printing on Kodak ESP series AiO printers
Version 2.5 (c2esp25) was significantly changed to allow better colour management.
The following things can be changed in the ppd driver file to influence the colours.
Attribute cupsInkLimit "" "2.0"
This attribute limits the total amount of ink in a dark area (the sum of all the colours)
is limited to the value given, eg 2.0 limits the total to two colours at full intensity,
which saves ink and avoids creating very wet patches.
ColorProfile 600x1200dpi/- 1.0 1.4
1.0 -0.1 0.0
-0.1 1.0 0.0
0.0 -0.4 1.0
On the line "ColorProfile..." the 1.0 is a density factor (value between 0.0 and 1.0),
the 1.4 is gamma. Increasing gamma makes mid tones lighter.
The 3x3 matrix that follows allows colours to be adjusted.
It modifies the CMY levels as follows:
input
C M Y
o C Cc Cm Cy
u M Mc Mm My
t Y Yc Ym Yy
For example: Moutput = Mc*Cinput + Mm*Minput + My*Yinput
I made Mc = -0.1 in order to make blue areas less purple.
and Ym = -0.4 in order to make red areas less orange.
Read more details at http://www.cups.org/documentation.php/doc-1.6/ref-ppdcfile.html
There is a second profile for 300x1200dpi
ColorProfile 300x1200dpi/- 1.0 1.0
1.0 0.0 0.0
-0.1 1.0 0.0
0.0 -0.3 1.0
......@@ -3,7 +3,7 @@
* Kodak ESP Cxxx (OPL?) Control Language filter for the Common UNIX
* Printing System (CUPS).
*
* copyright Paul Newall May 2010 - Jan 2012. VERSION 2.4 (c2esp24)
* copyright Paul Newall May 2010 - Jan 2012. VERSION 2.5a (c2esp25a)
* SUPPORT FOR ESP Cxxxx and Hero SERIES
* patch by user awl29 applied to fix problems with non bi-directional printers, smb shared
* data chunk size limit applied
......@@ -44,8 +44,7 @@ KodakPrintFile = The data that is sent to the printer
/*
* Constants...
*/
char *Version = "c2espC24";
unsigned char ESC = 255;
char *Version = "c2espC25a";
/*
* Globals...
......@@ -80,19 +79,6 @@ FILE *RawColourFile = NULL; //file descriptor for input to dither
FILE *DitheredColourFile = NULL; //file descriptor for output from dither
#endif
time_t KeepAwake(time_t Start, int Interval)
{
// Keeps the printer connection awake by sending DeviceStatus query not sooner than the specified interval in seconds
// Usage: Start = KeepAwake(Start, Interval);
if(time(NULL) - Start > Interval)
{
DoLog("Keeping printer awake by DeviceStatus?\n",0,0);
GoodExchange(PrintFile, "DeviceStatus?", "0101,DeviceStatus.ImageDevice", DoBack, 1, 1.0);
return (time(NULL));
}
else return (Start);
}
void
SetupPrinter(cups_page_header2_t *header)
{
......@@ -520,7 +506,7 @@ main(int argc, char *argv[]) /* I - Number of command-line arguments, Command-
{
if (Canceled) break;
/* Keep the printer connection awake, added if (DoBack) 15/1/12 */
if (DoBack) KeepAwakeStart = KeepAwake(KeepAwakeStart,10);
if (DoBack) KeepAwakeStart = KeepAwake(KeepAwakeStart,10, PrintFile);
//read a line
if (!cupsRasterReadPixels(ras, CupsLineBuffer, header.cupsBytesPerLine)) break;
......
/*
*
* Kodak ESP Cxxx (OPL?) Control Language filters for the Common UNIX
* Printing System (CUPS).
* common functions for c2esp, c2espC filters
*
* copyright Paul Newall May 2010 - Nov 2011. VERSION 2 (first used in c2esp22~rc1)
* copyright Paul Newall May 2010 - Apr 2012. VERSION 3 (first used in c2esp25)
*
*/
#include <stdio.h>
#include <string.h>
#include <cups/sidechannel.h> //FlushBackChannel, and the side channel functions and constants
......@@ -21,7 +19,7 @@
/*
* Constants...
*/
unsigned char NL = 10;
//unsigned char NL = 10;
/*
* Globals...
......@@ -34,6 +32,20 @@ FILE *LogFile = NULL; //file descriptor for log file
time_t StartTime;
int BlackPercent, ColourPercent;
time_t KeepAwake(time_t Start, int Interval, FILE *PrintFile)
{
// Keeps the printer connection awake by sending DeviceStatus query not sooner than the specified interval in seconds
// Usage: Start = KeepAwake(Start, Interval);
if(time(NULL) - Start > Interval)
{
DoLog("Keeping printer awake by DeviceStatus?\n",0,0);
GoodExchange(PrintFile, "DeviceStatus?", "0101,DeviceStatus.ImageDevice", DoBack, 1, 1.0);
return (time(NULL));
}
else return (Start);
}
void SetupLogging(char *ExtCallerName, int ExtDoBack, char *ExtLogFileName)
{
strcpy(CallerName,ExtCallerName);
......@@ -95,7 +107,11 @@ void DoOutJob(FILE *OutFile, char *PrintFormat, int I1, int I2)
int i;
if (OutFile) fprintf(OutFile, PrintFormat, I1, I2); //to the specified file
#if TESTING == 0
strcpy(LogFormat, "-> ");
#else
strcpy(LogFormat, "-block- ");
#endif
strcat(LogFormat,PrintFormat);
DoLog(LogFormat, I1, I2); //and the log
#if TESTING == 0
......@@ -168,14 +184,16 @@ int GoodExchange(FILE *PrintFile, char *Command, char *Expect, int DoBack, unsi
// don't actually need the info but nice to be able to read it all.....
int ReturnSign = -1; //assume we won't find the string we want
int BlackPercentFound, ColourPercentFound;
#if TESTING == 0
DoLogString("-> %s\n", Command); //now also sends to stderr
#else
DoLogString("-block- %s\n", Command); //now also sends to stderr
#endif
if(PrintFile) fprintf(PrintFile, "%s", Command); //to the global print file
#if TESTING == 0
fprintf(stdout, "%s", Command); //printer command
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)
#endif
if(DoBack)
{
......@@ -220,6 +238,7 @@ int GoodExchange(FILE *PrintFile, char *Command, char *Expect, int DoBack, unsi
}
}
return 0;
#endif
}
int
......
......@@ -4,41 +4,32 @@
* Printing System (CUPS).
* common functions for c2esp, c2espC filters header file
*
* copyright Paul Newall May 2010 - Oct 2011. VERSION 1 (first used in c2esp21~rc3)
* copyright Paul Newall May 2010 - Oct 2011. VERSION 2 (first used in c2esp25)
*
*/
//#include <cups/raster.h>
#include <cups/sidechannel.h> //FlushBackChannel, and the side channel functions and constants
#include <fcntl.h> //files
//#include <sys/stat.h>
//#include <signal.h>
//#include <errno.h>
//#include <cups/driver.h> //has the dither functions probably not needed for Cxxx
#include <time.h> //time functions used for debugging
/*
* Constants...
char *Version = "c2espcommon01";
unsigned char ESC = 255;
unsigned char NL = 10;
*/
#define DEBUGFILES 0 /* DEBUGFILES 1 creates files in /tmp to help debug */
#define TESTING 0 /* TESTING 1 suppresses the output to the printer */
#define ESC 255
#define NL 10
/*
* Globals...
char CallerName[50]; // String that identifies the calling program
int DoBack; // Enables the back channel comms
char BackBuf[32000]; //for the back channel replies from the printer
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
time_t KeepAwake(time_t Start, int Interval, FILE *PrintFile);
void SetupLogging(char *ExtCallerName, int ExtDoBack, char *ExtLogFileName);
void CloseLogging();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/bin/sh
# script for c2esp, extracts c2esp entries from the cups error log
# This is just a time saver for developers
# This is just a time saver for developers / debuggers
grep c2esp /var/log/cups/error_log
......@@ -23,8 +23,8 @@ Maintenance=003?
0096, OK, Maintenance Started;
*/
#define DEBUGFILES 0 /* DEBUGFILES 1 creates files in /tmp to help debug */
#define TESTING 0 /* TESTING 1 suppresses output to the printer to help debug */
/*#define DEBUGFILES 0 DEBUGFILES 1 creates files in /tmp to help debug */
/*#define TESTING 0 TESTING 1 suppresses output to the printer to help debug */
/*
* Include necessary headers...
......@@ -47,7 +47,7 @@ FILE *PrintFile = NULL; //file descriptor for debug file
//int BackBufLen=sizeof(BackBuf)-1,
int DoBack=1; /* Enables the back channel comms */
/*
time_t KeepAwake(time_t Start, int Interval)
{
// Keeps the printer connection awake by sending DeviceStatus query not sooner than the specified interval in seconds
......@@ -60,6 +60,7 @@ time_t KeepAwake(time_t Start, int Interval)
}
else return (Start);
}
*/
void
KeepAwakeFor(int Duration, int Interval)
......@@ -72,7 +73,7 @@ KeepAwakeFor(int Duration, int Interval)
for (i=0;i<Duration;++i)
{
sleep(1);
KeepAwakeStart = KeepAwake(KeepAwakeStart,Interval);
KeepAwakeStart = KeepAwake(KeepAwakeStart, Interval, PrintFile);
}
}
......
*PPD-Adobe: "4.3"
*%%%% PPD file for Kodak ESP 2100 Series AiO with CUPS.
*%%%% Created by the CUPS PPD Compiler CUPS v1.5.0.
*% Copyright 2011 by Paul Newall
*FormatVersion: "4.3"
*FileVersion: "1.4"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PCFileName: "KESP21xx.ppd"
*Product: "(Kodak ESP 2100 Series AiO)"
*Manufacturer: "Eastman Kodak"
*ModelName: "Eastman Kodak Kodak ESP 2100 Series AiO"
*ShortNickName: "Eastman Kodak Kodak ESP 2100 Series AiO"
*NickName: "Kodak ESP 2100"
*PSVersion: "(3010.000) 0"
*LanguageLevel: "3"
*ColorDevice: True
*DefaultColorSpace: CMY
*FileSystem: False
*Throughput: "8"
*LandscapeOrientation: Plus90
*TTRasterizer: Type42
*% Driver-defined attributes...
*cupsSNMPSupplies: False
*cupsCommands: "Clean PrintSelfTestPage PrintAlignmentPage ReportLevels"
*marker-colors: "black magenta"
*1284DeviceID: "MFG:Eastman Kodak Company;MDL:KODAK ESP 2100 Series AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;"
*cupsVersion: 1.4
*cupsModelNumber: 2100
*cupsManualCopies: True
*cupsFilter: "application/vnd.cups-raster 50 /usr/lib/cups/filter/c2espC"
*cupsFilter: "application/vnd.cups-command 50 /usr/lib/cups/filter/command2esp"
*cupsColorProfile 300x300dpi/-: "1 1 1 0 0 0 1 0 0 0 1"
*cupsColorProfile 600x600dpi/-: "1 1 1 0 0 0 1 0 0 0 1"
*cupsLanguages: "en"
*OpenUI *PageSize/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageSize
*DefaultPageSize: A4
*PageSize Executive/Executive: "<</PageSize[522 756]/ImagingBBox null>>setpagedevice"
*PageSize Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
*PageSize Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
*PageSize A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
*PageSize A5/A5: "<</PageSize[420 595]/ImagingBBox null>>setpagedevice"
*PageSize A6/A6: "<</PageSize[297 420]/ImagingBBox null>>setpagedevice"
*PageSize 8x10/8 x 10: "<</PageSize[576 720]/ImagingBBox null>>setpagedevice"
*PageSize Photo4x6/Photo: "<</PageSize[288 432]/ImagingBBox null>>setpagedevice"
*PageSize EnvISOB5/Envelope B5: "<</PageSize[499 709]/ImagingBBox null>>setpagedevice"
*PageSize EnvC5/Envelope C5: "<</PageSize[459 649]/ImagingBBox null>>setpagedevice"
*PageSize DL/Envelope DL: "<</PageSize[312 624]/ImagingBBox null>>setpagedevice"
*PageSize Env10/Envelope #10 : "<</PageSize[297 684]/ImagingBBox null>>setpagedevice"
*CloseUI: *PageSize
*OpenUI *PageRegion/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageRegion
*DefaultPageRegion: A4
*PageRegion Executive/Executive: "<</PageSize[522 756]/ImagingBBox null>>setpagedevice"
*PageRegion Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
*PageRegion Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
*PageRegion A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
*PageRegion A5/A5: "<</PageSize[420 595]/ImagingBBox null>>setpagedevice"
*PageRegion A6/A6: "<</PageSize[297 420]/ImagingBBox null>>setpagedevice"
*PageRegion 8x10/8 x 10: "<</PageSize[576 720]/ImagingBBox null>>setpagedevice"
*PageRegion Photo4x6/Photo: "<</PageSize[288 432]/ImagingBBox null>>setpagedevice"
*PageRegion EnvISOB5/Envelope B5: "<</PageSize[499 709]/ImagingBBox null>>setpagedevice"
*PageRegion EnvC5/Envelope C5: "<</PageSize[459 649]/ImagingBBox null>>setpagedevice"
*PageRegion DL/Envelope DL: "<</PageSize[312 624]/ImagingBBox null>>setpagedevice"
*PageRegion Env10/Envelope #10 : "<</PageSize[297 684]/ImagingBBox null>>setpagedevice"
*CloseUI: *PageRegion
*DefaultImageableArea: A4
*ImageableArea Executive/Executive: "3 3 519 753"
*ImageableArea Letter/US Letter: "3 3 609 789"
*ImageableArea Legal/US Legal: "3 3 609 1005"
*ImageableArea A4/A4: "3 3 592 839"
*ImageableArea A5/A5: "3 3 417 592"
*ImageableArea A6/A6: "3 3 294 417"
*ImageableArea 8x10/8 x 10: "3 3 573 717"
*ImageableArea Photo4x6/Photo: "3 3 285 429"
*ImageableArea EnvISOB5/Envelope B5: "3 3 496 706"
*ImageableArea EnvC5/Envelope C5: "3 3 456 646"
*ImageableArea DL/Envelope DL: "3 3 309 621"
*ImageableArea Env10/Envelope #10 : "3 3 294 681"
*DefaultPaperDimension: A4
*PaperDimension Executive/Executive: "522 756"
*PaperDimension Letter/US Letter: "612 792"
*PaperDimension Legal/US Legal: "612 1008"
*PaperDimension A4/A4: "595 842"
*PaperDimension A5/A5: "420 595"
*PaperDimension A6/A6: "297 420"
*PaperDimension 8x10/8 x 10: "576 720"
*PaperDimension Photo4x6/Photo: "288 432"
*PaperDimension EnvISOB5/Envelope B5: "499 709"
*PaperDimension EnvC5/Envelope C5: "459 649"
*PaperDimension DL/Envelope DL: "312 624"
*PaperDimension Env10/Envelope #10 : "297 684"
*MaxMediaWidth: "1080"
*MaxMediaHeight: "86400"
*HWMargins: 3 3 3 3
*CustomPageSize True: "pop pop pop <</PageSize[5 -2 roll]/ImagingBBox null>>setpagedevice"
*ParamCustomPageSize Width: 1 points 36 1080
*ParamCustomPageSize Height: 2 points 36 86400
*ParamCustomPageSize WidthOffset: 3 points 0 0
*ParamCustomPageSize HeightOffset: 4 points 0 0
*ParamCustomPageSize Orientation: 5 int 0 0
*OpenUI *Resolution/Resolution: PickOne
*OrderDependency: 20 AnySetup *Resolution
*DefaultResolution: 600x600dpi
*Resolution 300x300dpi/300x300: "<</HWResolution[300 300]/cupsBitsPerColor 8>>setpagedevice"
*Resolution 600x600dpi/600x600: "<</HWResolution[600 600]/cupsBitsPerColor 8>>setpagedevice"
*CloseUI: *Resolution
*OpenUI *ColorModel/ColorModel: PickOne
*OrderDependency: 10 AnySetup *ColorModel
*DefaultColorModel: CMY
*ColorModel Gray/Grayscale: "<</cupsColorSpace 3/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*ColorModel CMY/Color: "<</cupsColorSpace 4/cupsColorOrder 0/cupsCompression 0>>setpagedevice"
*CloseUI: *ColorModel
*DefaultFont: Courier
*Font AvantGarde-Book: Standard "(1.05)" Standard ROM
*Font AvantGarde-BookOblique: Standard "(1.05)" Standard ROM
*Font AvantGarde-Demi: Standard "(1.05)" Standard ROM
*Font AvantGarde-DemiOblique: Standard "(1.05)" Standard ROM
*Font Bookman-Demi: Standard "(1.05)" Standard ROM
*Font Bookman-DemiItalic: Standard "(1.05)" Standard ROM
*Font Bookman-Light: Standard "(1.05)" Standard ROM
*Font Bookman-LightItalic: Standard "(1.05)" Standard ROM
*Font Courier: Standard "(1.05)" Standard ROM
*Font Courier-Bold: Standard "(1.05)" Standard ROM
*Font Courier-BoldOblique: Standard "(1.05)" Standard ROM
*Font Courier-Oblique: Standard "(1.05)" Standard ROM
*Font Helvetica: Standard "(1.05)" Standard ROM
*Font Helvetica-Bold: Standard "(1.05)" Standard ROM
*Font Helvetica-BoldOblique: Standard "(1.05)" Standard ROM
*Font Helvetica-Narrow: Standard "(1.05)" Standard ROM
*Font Helvetica-Narrow-Bold: Standard "(1.05)" Standard ROM
*Font Helvetica-Narrow-BoldOblique: Standard "(1.05)" Standard ROM
*Font Helvetica-Narrow-Oblique: Standard "(1.05)" Standard ROM
*Font Helvetica-Oblique: Standard "(1.05)" Standard ROM
*Font NewCenturySchlbk-Bold: Standard "(1.05)" Standard ROM
*Font NewCenturySchlbk-BoldItalic: Standard "(1.05)" Standard ROM
*Font NewCenturySchlbk-Italic: Standard "(1.05)" Standard ROM
*Font NewCenturySchlbk-Roman: Standard "(1.05)" Standard ROM
*Font Palatino-Bold: Standard "(1.05)" Standard ROM
*Font Palatino-BoldItalic: Standard "(1.05)" Standard ROM
*Font Palatino-Italic: Standard "(1.05)" Standard ROM
*Font Palatino-Roman: Standard "(1.05)" Standard ROM
*Font Symbol: Special "(001.005)" Special ROM
*Font Times-Bold: Standard "(1.05)" Standard ROM
*Font Times-BoldItalic: Standard "(1.05)" Standard ROM
*Font Times-Italic: Standard "(1.05)" Standard ROM
*Font Times-Roman: Standard "(1.05)" Standard ROM
*Font ZapfChancery-MediumItalic: Standard "(1.05)" Standard ROM
*Font ZapfDingbats: Special "(001.005)" Special ROM
*% End of KESP21xx.ppd, 07628 bytes.
*PPD-Adobe: "4.3"
*%%%% PPD file for Kodak ESP 3200 Series AiO with CUPS.
*%%%% Created by the CUPS PPD Compiler CUPS v1.5.0.
*% Copyright 2011 by Paul Newall
*% Copyright 2011-2012 by Paul Newall
*FormatVersion: "4.3"
*FileVersion: "1.4"
*LanguageVersion: English
......@@ -23,6 +23,9 @@
*% Driver-defined attributes...
*cupsSNMPSupplies: False
*cupsCommands: "Clean PrintSelfTestPage PrintAlignmentPage ReportLevels"
*cupsInkChannels: "4"
*cupsInkLimit: "2.0"
*cupsBlackGeneration: "0.0 0.0"
*marker-colors: "black magenta"
*1284DeviceID: "MFG:Eastman Kodak Company;MDL:KODAK ESP 3200 Series AiO;CMD:OPL V1.00;CLS:PRINTER;DES:AIO;VER:1.00;"
*cupsVersion: 1.4
......@@ -30,8 +33,8 @@
*cupsManualCopies: True
*cupsFilter: "application/vnd.cups-raster 50 /usr/lib/cups/filter/c2esp"
*cupsFilter: "application/vnd.cups-command 50 /usr/lib/cups/filter/command2esp"
*cupsColorProfile 300x1200dpi/-: "1 1 1 0 0 -0.20000000298 1 0 0 -0.40000000596 1"
*cupsColorProfile 600x1200dpi/-: "1 1.5 1 0 0 -0.20000000298 1 0 0 -0.40000000596 1