From a68ece422e0be1a0101dae2fa2408ef0e533c2e9 Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Sun, 4 Jan 2009 18:17:34 +0000 Subject: Imported Upstream version 5.2.3 --- src/cups/genppd.c | 42 +- src/cups/test-rastertogutenprint.in | 8 +- src/escputil/d4lib.c | 172 +++++- src/escputil/d4lib.h | 6 +- src/escputil/escputil.c | 173 +++---- src/foomatic/foomatic-printermap | 15 + src/main/canon-inks.h | 105 ++++ src/main/canon-media.h | 80 ++- src/main/canon-printers.h | 56 ++ src/main/print-canon.c | 18 +- src/main/print-escp2-data.c | 18 +- src/main/print-escp2.c | 39 +- src/main/print-escp2.h | 9 +- src/testpattern/testpatterny.c | 135 ++--- src/testpattern/testpatterny.y | 3 +- src/xml/escp2/inks/Makefile.am | 3 +- src/xml/escp2/inks/Makefile.in | 1 + src/xml/escp2/inks/artisan.xml | 285 ++++++++++ src/xml/escp2/inputslots/Makefile.am | 4 +- src/xml/escp2/inputslots/Makefile.in | 2 + src/xml/escp2/inputslots/artisan.xml | 40 ++ src/xml/escp2/inputslots/rx680.xml | 40 ++ src/xml/escp2/media/Makefile.am | 3 +- src/xml/escp2/media/Makefile.in | 1 + src/xml/escp2/media/nx100.xml | 980 +++++++++++++++++++++++++++++++++++ src/xml/escp2/model/Makefile.am | 5 +- src/xml/escp2/model/Makefile.in | 3 +- src/xml/escp2/model/model_87.xml | 5 +- src/xml/escp2/model/model_94.xml | 77 +-- src/xml/escp2/model/model_96.xml | 67 ++- src/xml/escp2/model/model_97.xml | 188 +++++++ src/xml/printers.xml | 29 +- 32 files changed, 2246 insertions(+), 366 deletions(-) create mode 100644 src/xml/escp2/inks/artisan.xml create mode 100644 src/xml/escp2/inputslots/artisan.xml create mode 100644 src/xml/escp2/inputslots/rx680.xml create mode 100644 src/xml/escp2/media/nx100.xml create mode 100644 src/xml/escp2/model/model_97.xml (limited to 'src') diff --git a/src/cups/genppd.c b/src/cups/genppd.c index 2325fbd..580c59c 100644 --- a/src/cups/genppd.c +++ b/src/cups/genppd.c @@ -1,5 +1,5 @@ /* - * "$Id: genppd.c,v 1.170 2008/09/25 23:41:00 rlk Exp $" + * "$Id: genppd.c,v 1.171 2008/12/05 03:27:20 easysw Exp $" * * PPD file generation program for the CUPS drivers. * @@ -200,6 +200,13 @@ int /* O - Exit status */ main(int argc, /* I - Number of command-line arguments */ char *argv[]) /* I - Command-line arguments */ { + /* + * Force POSIX locale, since stp_init incorrectly calls setlocale... + */ + + putenv((char *)"LANG=C"); + putenv((char *)"LC_ALL=C"); + putenv((char *)"LC_NUMERIC=C"); /* * Initialise libgutenprint @@ -893,6 +900,7 @@ write_ppd( min_height, max_width, max_height; + char dimstr[255]; /* Dimension string */ stp_parameter_t desc; stp_parameter_list_t param_list; const stp_param_string_t *opt; @@ -1794,13 +1802,10 @@ write_ppd( for (i = desc.bounds.dimension.lower; i <= desc.bounds.dimension.upper; i++) { - /* FIXME - * For now, just use mm; we'll fix it later - * for the locale-appropriate setting. - * --rlk 20040818 - */ - gzprintf(fp, "*Stp%s %d/%.1f mm: \"\"\n", - desc.name, i, ((double) i) * 25.4 / 72); + snprintf(dimstr, sizeof(dimstr), _("%.1f mm"), + (double)i * 25.4 / 72.0); + gzprintf(fp, "*Stp%s %d/%s: \"\"\n", + desc.name, i, dimstr); } print_close_ui = 0; @@ -2197,19 +2202,14 @@ write_ppd( if (!desc.is_mandatory) gzprintf(fp, "*%s.Stp%s %s/%s: \"\"\n", lang, desc.name, "None", _("None")); - if (localize_numbers) + /* Unlike the other fields, dimensions are not strictly numbers */ + for (i = desc.bounds.dimension.lower; + i <= desc.bounds.dimension.upper; i++) { - for (i = desc.bounds.dimension.lower; - i <= desc.bounds.dimension.upper; i++) - { - /* FIXME - * For now, just use mm; we'll fix it later - * for the locale-appropriate setting. - * --rlk 20040818 - */ - gzprintf(fp, "*%s.Stp%s %d/%.1f mm: \"\"\n", lang, - desc.name, i, ((double) i) * 25.4 / 72); - } + snprintf(dimstr, sizeof(dimstr), _("%.1f mm"), + (double)i * 25.4 / 72.0); + gzprintf(fp, "*%s.Stp%s %d/%s: \"\"\n", lang, + desc.name, i, dimstr); } gzprintf(fp, "*%s.ParamCustomStp%s Value/%s: \"\"\n", lang, desc.name, _("Value")); @@ -2320,5 +2320,5 @@ write_ppd( /* - * End of "$Id: genppd.c,v 1.170 2008/09/25 23:41:00 rlk Exp $". + * End of "$Id: genppd.c,v 1.171 2008/12/05 03:27:20 easysw Exp $". */ diff --git a/src/cups/test-rastertogutenprint.in b/src/cups/test-rastertogutenprint.in index 40e7b49..97ae27d 100755 --- a/src/cups/test-rastertogutenprint.in +++ b/src/cups/test-rastertogutenprint.in @@ -64,7 +64,7 @@ fi version="@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@"; cupsdir="@cups_conf_serverbin@/filter" -if [ -x "$cupsdir/pstoraster" ] ; then +if [ -x "$cupsdir/pstoraster" -o -x "$cupsdir/cgpdftoraster" ] ; then pages='page-ranges=24-26 ' else pages='' @@ -84,6 +84,10 @@ cleanup() { pdftops="`type -p pdftops`" +if [ ! -n "$pdftops" -o ! -x "$pdftops" ] ; then + pdftops="`whence pdftops`" +fi + if [ -n "$pdftops" -a ! -x "$cupsdir/cgpdftoraster" ] ; then tfile=`mktemp` trap cleanup 1 2 3 6 14 15 30 @@ -185,6 +189,8 @@ get_ppds() { if [ -n "$make_ppds" -o ! -d ppd/C ] ; then make ppd-nonls +## Not all systems can work with gzipped PPDs + find ppd/C -name '*.ppd.gz' | xargs gunzip -f fi do_output() { diff --git a/src/escputil/d4lib.c b/src/escputil/d4lib.c index 17cd4ae..3c98f81 100644 --- a/src/escputil/d4lib.c +++ b/src/escputil/d4lib.c @@ -67,6 +67,8 @@ static signalHandler_t sig; static int timeoutGot = 0; static int _readData(int fd, unsigned char *buf, int len); +static int d4Errno = 0; + /* commands for the D4 protocol Transaction Cmd Reply @@ -305,7 +307,8 @@ static int printError(unsigned char errorNb) { if ( msg->result == errorNb ) { - fprintf(stderr,"%s\n", msg->message); + if (debugD4) + fprintf(stderr,"%s\n", msg->message); return msg->errorClass; } msg++; @@ -326,9 +329,11 @@ static int printError(unsigned char errorNb) static void printCmdType(unsigned char *cmd) { + if (cmd[6] & 0x80) + fprintf(stderr, ">>>"); if ( cmd[0] == 0 && cmd[1] == 0 ) { - switch(cmd[6]) + switch(cmd[6] & 0x7f) { case 0: fprintf(stderr,"--- Init ---\n");break; case 1: fprintf(stderr,"--- OpenChannel ---\n");break; @@ -436,7 +441,7 @@ static int writeCmd(int fd, unsigned char *cmd, int len) /* */ /*******************************************************************/ -int readAnswer(int fd, unsigned char *buf, int len) +int readAnswer(int fd, unsigned char *buf, int len, int allowExtra) { int rd = 0; int total = 0; @@ -445,6 +450,7 @@ int readAnswer(int fd, unsigned char *buf, int len) long dt; int count = 0; int first_read = 1; + int excess = 0; /* wait a little bit before reading an answer */ usleep(d4RdTimeout); @@ -508,15 +514,50 @@ int readAnswer(int fd, unsigned char *buf, int len) /* in case of errors this may differ from */ /* the expected lenght. Setting len to this */ /* value will avoid waiting for timeout */ - len = (buf[2] << 8) + buf[3]; - len = (len > sizeof(buf))?sizeof(buf) - 1:len; + int newlen = (buf[2] << 8) + buf[3]; + if (len > newlen) + { + if (debugD4) + fprintf(stderr, "Changing len from %d to %d\n", len, newlen); + len = newlen; + } + else if (len < newlen) + { + excess = newlen - len; + if (debugD4) + fprintf(stderr, "Expected %d, getting %d, %sflushing %d\n", + len, newlen, allowExtra ? "not " : "", excess); + } } } usleep(d4RdTimeout); } + if (! allowExtra) + { + int retry_count = 0; + while (excess > 0) + { + char wastebuf[256]; + int bytes = excess > 256 ? 256 : excess; + int status = read(fd, wastebuf, bytes); + if (status < 0) + break; + else if (status == 0 && retry_count > 2) + break; + else if (status == 0) + retry_count++; + else + retry_count = 0; + if (status < bytes) + usleep(d4RdTimeout); + printHexValues("waste", (const unsigned char *) wastebuf, status); + excess -= status; + } + } if ( debugD4 ) { + printCmdType(buf); # if PTIME gettimeofday(&end, NULL); # endif @@ -673,15 +714,16 @@ static int _readData(int fd, unsigned char *buf, int len) /* */ /*******************************************************************/ -static int sendReceiveCmd(int fd, unsigned char *cmd, int len, unsigned char *answer, int expectedlen) +static int sendReceiveCmd(int fd, unsigned char *cmd, int len, unsigned char *answer, int expectedlen, int allowExtra) { int rd; + d4Errno = 0; if ( (rd = writeCmd(fd, cmd, len ) ) != len ) { if ( rd < 0 ) return -1; return 0; } - rd = readAnswer(fd, answer, expectedlen ); + rd = readAnswer(fd, answer, expectedlen, allowExtra ); if ( rd == 0 ) { /* no answer from device */ @@ -700,10 +742,12 @@ static int sendReceiveCmd(int fd, unsigned char *cmd, int len, unsigned char *an if ( answer[6] == 0x7f ) { printError(answer[9]); + d4Errno = answer[9]; return -1; } else if ( answer[7] != 0 ) { + d4Errno = answer[7]; if ( printError(answer[7]) ) { return -1; @@ -742,7 +786,7 @@ Loop: { return 0; } - rd = readAnswer(fd, buf, 8); + rd = readAnswer(fd, buf, 8, 0); if ( rd == 0 ) { /* no answer from device */ @@ -789,7 +833,7 @@ int Init(int fd) cmd.head.command = 0; cmd.revision = 0x10; - rd = sendReceiveCmd(fd, (unsigned char*)&cmd, sizeof(cmd), buf, 9 ); + rd = sendReceiveCmd(fd, (unsigned char*)&cmd, sizeof(cmd), buf, 9, 0 ); return rd == 9 ? 1 : 0; } @@ -815,7 +859,7 @@ int Exit(int fd) cmd.control = 0; cmd.command = 8; - rd = sendReceiveCmd(fd, (unsigned char*)&cmd, sizeof(cmd), buf, 8 ); + rd = sendReceiveCmd(fd, (unsigned char*)&cmd, sizeof(cmd), buf, 8, 0 ); return rd > 0 ? 1 : rd; } @@ -846,7 +890,7 @@ int GetSocketID(int fd, const char *serviceName) cmd->command = 0x09; strcpy(buf + sizeof(cmdHeader_t), serviceName); - rd = sendReceiveCmd(fd, (unsigned char*)buf, len, rBuf, len + 2); + rd = sendReceiveCmd(fd, (unsigned char*)buf, len, rBuf, len + 2, 0); if ( rd > 0 ) { return rBuf[8]; @@ -873,8 +917,9 @@ int OpenChannel(int fd, unsigned char sockId, int *sndSz, int *rcvSz) unsigned char cmd[17]; unsigned char buf[20]; int rd; + int i; - for(;;) + for(i = 0; i < 5; i++) /* Retry count */ { cmd[0] = 0; /* transaction sockets */ cmd[1] = 0; @@ -894,10 +939,20 @@ int OpenChannel(int fd, unsigned char sockId, int *sndSz, int *rcvSz) cmd[15] = 0; /* initial credit for us ? */ cmd[16] = 0; - rd = sendReceiveCmd(fd, cmd, 17, buf, 16); + rd = sendReceiveCmd(fd, cmd, 17, buf, 16, 0); if ( rd == -1 ) { - return -1; + if (debugD4) + fprintf(stderr, "OpenChannel %d fails, error %d\n", sockId, d4Errno); + if (d4Errno == 6) /* channel already open */ + { + if ( debugD4 ) + fprintf(stderr, "Channel %d already open, closing\n", sockId); + CloseChannel(fd, sockId); + continue; + } + else + return -1; } else if ( rd == 16 ) { @@ -908,6 +963,8 @@ int OpenChannel(int fd, unsigned char sockId, int *sndSz, int *rcvSz) } else if ( buf[7] != 0 ) { + if (debugD4) + fprintf(stderr, "OpenChannel %d fails, hard error\n", sockId); /* hard error */ return -1; } @@ -917,7 +974,16 @@ int OpenChannel(int fd, unsigned char sockId, int *sndSz, int *rcvSz) } else { + if (d4Errno == 6) /* channel already open */ + { + if ( debugD4 ) + fprintf(stderr, "Channel %d already open, closing\n", sockId); + CloseChannel(fd, sockId); + continue; + } /* at this stage we can only have an error */ + if (debugD4) + fprintf(stderr, "OpenChannel %d fails, wrong count %d\n", sockId, rd); return -1; } } @@ -949,7 +1015,7 @@ int CloseChannel(int fd, unsigned char socketID) buf[sizeof(cmdHeader_t)+0] = socketID; buf[sizeof(cmdHeader_t)+1] = socketID; buf[sizeof(cmdHeader_t)+2] = 0; - rd = sendReceiveCmd(fd, buf,10, buf, 10); + rd = sendReceiveCmd(fd, buf,10, buf, 10, 0); return rd == 10 ? 1 : rd; } @@ -982,7 +1048,7 @@ int CreditRequest(int fd, unsigned char socketID) buf[sizeof(cmdHeader_t)+3] = 0x80; buf[sizeof(cmdHeader_t)+4] = 0xff; buf[sizeof(cmdHeader_t)+5] = 0xff; - rd = sendReceiveCmd(fd, buf, 13, rBuf, 12); + rd = sendReceiveCmd(fd, buf, 13, rBuf, 12, 0); if ( rd == 12 ) { /* this is the credit */ @@ -1023,7 +1089,7 @@ int Credit(int fd, unsigned char socketID, int credit) buf[sizeof(cmdHeader_t)+1] = socketID; buf[sizeof(cmdHeader_t)+2] = credit >> 8; buf[sizeof(cmdHeader_t)+3] = credit & 0xff; - rd = sendReceiveCmd(fd, buf, 11, rBuf, 10); + rd = sendReceiveCmd(fd, buf, 11, rBuf, 10, 0); if ( rd == 10 ) { return 1; @@ -1039,7 +1105,7 @@ int Credit(int fd, unsigned char socketID, int credit) /* Convenience function */ /* handle the CreditRequest command */ /* Input: int fd file handle */ -/* unsigned char socketID */ +/* unsigned char socketID */ /* IN/Out int *sndSize for error handling */ /* IN/Out int *rcvSize for error handling */ /* */ @@ -1054,10 +1120,11 @@ int askForCredit(int fd, unsigned char socketID, int *sndSize, int *rcvSize) { int credit = 0; int count = 0; + int retries = 10; - while (credit == 0 ) + while (credit == 0 && retries-- >= 0 ) { - while((credit=CreditRequest(fd,socketID)) == 0 && count < MAX_CREDIT_REQUEST ) + while((credit=CreditRequest(fd,socketID)) == 0 && count < MAX_CREDIT_REQUEST && retries-- >= 0) usleep(d4RdTimeout); if ( credit == -1 ) @@ -1069,8 +1136,11 @@ int askForCredit(int fd, unsigned char socketID, int *sndSize, int *rcvSize) credit = 0; /* init printer and reopen the printer channel */ CloseChannel(fd, socketID); + socketID = GetSocketID(fd, "EPSON-CTRL"); if ( Init(fd) ) { + if (debugD4) + fprintf(stderr, "askForCredit init succeeded, now try to open\n"); OpenChannel(fd, socketID, sndSize, rcvSize); } } @@ -1087,8 +1157,8 @@ int askForCredit(int fd, unsigned char socketID, int *sndSize, int *rcvSize) /* Convenience function */ /* write the data to the device */ /* Input: int fd file handle */ -/* unsigned char socketID the deetination socket */ -/* unsigned char *buf the datas to be send */ +/* unsigned char socketID the deetination socket */ +/* unsigned char *buf the datas to be send */ /* int len how many datas are to we send */ /* int eoj set out of band flag if eoj set */ /* */ @@ -1177,11 +1247,11 @@ int writeData(int fd, unsigned char socketID, const unsigned char *buf, int len, /* Convenience function */ /* give credit and read then the expected datas */ /* Input: int fd file handle */ -/* unsigned char socketID the destination socket */ -/* unsigned char *buf the datas to be send */ +/* unsigned char socketID the destination socket */ +/* unsigned char *buf the datas to be send */ /* int len howmany datas are to we send */ /* */ -/* Return: number of bytes written or -1; */ +/* Return: number of bytes read or -1; */ /* */ /*******************************************************************/ @@ -1202,6 +1272,58 @@ int readData(int fd, unsigned char socketID, unsigned char *buf, int len) } } +/*******************************************************************/ +/* Function writeAndReadData() */ +/* Convenience function */ +/* give credit and read then the expected datas */ +/* Input: int fd file handle */ +/* unsigned char socketID the destination socket */ +/* unsigned char *cmd the datas to be send */ +/* int cmd_len howmany datas are to we send */ +/* int eoj set out of band flag if eoj set */ +/* unsigned char *buf the datas to be send */ +/* int *sndSz Send buffer size */ +/* int *rcvSz Receive buffer size */ +/* int len how many datas are to we send */ +/* fptr test function to verify buffer contents */ +/* */ +/* Return: number of bytes read or -1; */ +/* */ +/* This allows us to give credit before sending the command. */ +/* Sending the command and then giving credit sometimes causes */ +/* the actual data to be sent as a reply to the credit command. */ +/* */ +/*******************************************************************/ + +int writeAndReadData(int fd, unsigned char socketID, + const unsigned char *cmd, int cmd_len, int eoj, + unsigned char *buf, int len, int *sndSz, int *rcvSz, + int (*test)(const unsigned char *buf)) +{ + int ret; + int retry = 5; + int credit = askForCredit(fd, socketID, sndSz, rcvSz); + if (credit < 0) + return -1; + /* give credit */ + if ( Credit(fd, socketID, 1) == 1 ) + { + if (writeData(fd, socketID, cmd, cmd_len, eoj) <= 0) + return -1; + /* wait a little bit */ + do + { + usleep(1000); + ret = _readData(fd, buf, len); + if (ret < 0) + return ret; + } while (retry-- >= 0 && (!test || !(*test)(buf))); + return ret; + } + else + return -1; +} + /*******************************************************************/ /* Function readData() */ /* Convenience function */ diff --git a/src/escputil/d4lib.h b/src/escputil/d4lib.h index 41a6c6b..76aebd3 100644 --- a/src/escputil/d4lib.h +++ b/src/escputil/d4lib.h @@ -35,7 +35,11 @@ extern int SafeWrite(int fd, const void *data, int len); extern int askForCredit(int fd, unsigned char socketID, int *sndSz, int *rcvSz); extern int writeData(int fd, unsigned char socketID, const unsigned char *buf, int len, int eoj); extern int readData(int fd, unsigned char socketID, unsigned char *buf, int len); -extern int readAnswer(int fd, unsigned char *buf, int len); +extern int writeAndReadData(int fd, unsigned char socketID, + const unsigned char *cmd, int cmd_len, int eoj, + unsigned char *buf, int len, int *sndSz, int *rcvSz, + int (*test)(const unsigned char *buf)); +extern int readAnswer(int fd, unsigned char *buf, int len, int allowExtra); extern void flushData(int fd, unsigned char socketID); extern void setDebug(int debug); diff --git a/src/escputil/escputil.c b/src/escputil/escputil.c index 3d7b65d..df65b46 100644 --- a/src/escputil/escputil.c +++ b/src/escputil/escputil.c @@ -1,5 +1,5 @@ /* - * "$Id: escputil.c,v 1.97 2008/10/29 00:10:42 easysw Exp $" + * "$Id: escputil.c,v 1.99 2008/12/21 18:35:43 rlk Exp $" * * Printer maintenance utility for EPSON Stylus (R) printers * @@ -279,6 +279,14 @@ initialize_print_cmd(int do_init) exit_packet_mode_old(do_init); } +static void +initialize_print_cmd_new(int do_init) +{ + bufpos = 0; + STP_DEBUG(fprintf(stderr, "Initialize print command (force new)\n")); + exit_packet_mode_old(do_init); +} + int main(int argc, char **argv) { @@ -539,7 +547,7 @@ read_from_printer(int fd, char *buf, int bufsize, int quiet) int retry = 100; #ifdef HAVE_FCNTL_H fcntl(fd, F_SETFL, - O_NONBLOCK | fcntl(fd, F_GETFL)); + O_NONBLOCK | (fcntl(fd, F_GETFL) & ~(O_RDONLY|O_WRONLY|O_RDWR))); #endif memset(buf, 0, bufsize); @@ -784,13 +792,32 @@ set_printer_model(void) the_printer_t = NULL; } +static int +test_for_di(const unsigned char *buf) +{ + return !(strncmp("di", (const char *)buf, 2) && + strncmp("@EJL ID", (const char *)buf, 7)); +} + +static int +test_for_st(const unsigned char *buf) +{ + return !(strncmp("st", (const char *)buf, 2) && + strncmp("@BDC ST", (const char *)buf, 7)); +} + +static int +test_for_ii(const unsigned char *buf) +{ + return !(strncmp("ii", (const char *)buf, 2) && + strncmp("@BDC PS", (const char *)buf, 7)); +} + static const stp_printer_t * initialize_printer(int quiet, int fail_if_not_found) { int packet_initialized = 0; int fd; - int credit; - int retry = 4; int tries = 0; int status; int forced_packet_mode = 0; @@ -847,38 +874,29 @@ initialize_printer(int quiet, int fail_if_not_found) if (forced_packet_mode || ((buf[3] == status) && (buf[6] == 0x7f))) { + /* + * NX100 looks like it's in D4 mode, but it doesn't really + * respond correctly. So we force it out of D4 mode and + * then back in to ensure that it's right. Trying to force + * it into D4 mode alone isn't good enough. + */ + initialize_print_cmd_new(0); + (void) SafeWrite(fd, printer_cmd, bufpos); + flushData(fd, (unsigned char) -1); + forced_packet_mode = !init_packet(fd, 1); STP_DEBUG(fprintf(stderr, "Printer in packet mode....\n")); packet_initialized = 1; isnew = 1; - - credit = askForCredit(fd, socket_id, &send_size, &receive_size); - if (credit < 0) - { - STP_DEBUG(fprintf(stderr, "Cannot get credit\n")); - return NULL; - } /* request status command */ - status = writeData(fd, socket_id, (const unsigned char*)"di\1\0\1", - 5, 1); + status = + writeAndReadData(fd, socket_id, (const unsigned char*)"di\1\0\1", + 5, 1, (unsigned char *) buf, 1023, + &send_size, &receive_size, &test_for_di); if (status <= 0) { fprintf(stderr, _("\nCannot write to %s: %s\n"), raw_device, strerror(errno)); - return NULL; - } - do - { - status = readData(fd, socket_id, (unsigned char*)buf, 1023); - STP_DEBUG(fprintf(stderr, "readData try %d status %d\n", - retry, status)); - if (status <= -1 ) - return NULL; - } - while ( (retry-- != 0) && strncmp("di", (char*)buf, 2) && - strncmp("@EJL ID", (char*)buf, 7)); - if (!retry) - { - STP_DEBUG(fprintf(stderr, "No retries left!\n")); + close(fd); return NULL; } } @@ -887,16 +905,16 @@ initialize_printer(int quiet, int fail_if_not_found) if (status > 0) { pos = strstr((char*)buf, "@EJL ID"); - STP_DEBUG(fprintf(stderr, "pos: %s\n", pos)); + STP_DEBUG(fprintf(stderr, "pos: %s\n", pos ? pos : "(null)")); if (pos) pos = strchr(pos, (int) ';'); - STP_DEBUG(fprintf(stderr, "pos: %s\n", pos)); + STP_DEBUG(fprintf(stderr, "pos: %s\n", pos ? pos : "(null)")); if (pos) pos = strchr(pos + 1, (int) ';'); - STP_DEBUG(fprintf(stderr, "pos: %s\n", pos)); + STP_DEBUG(fprintf(stderr, "pos: %s\n", pos ? pos : "(null)")); if (pos) pos = strchr(pos, (int) ':'); - STP_DEBUG(fprintf(stderr, "pos: %s\n", pos)); + STP_DEBUG(fprintf(stderr, "pos: %s\n", pos ? pos : "(null)")); if (pos) { spos = strchr(pos, (int) ';'); @@ -930,6 +948,7 @@ initialize_printer(int quiet, int fail_if_not_found) else { STP_DEBUG(fprintf(stderr, "Can't get response to @EJL ID\n")); + close(fd); return NULL; } } @@ -1232,6 +1251,9 @@ print_old_ink_levels(const char *ind, stp_string_list_t *color_list) static void do_old_status(status_cmd_t cmd, const char *buf, const stp_printer_t *printer) { + if (cmd == CMD_STATUS) + printf(_("Printer Name: %s\n"), + printer ? stp_printer_get_long_name(printer) : _("Unknown")); do { const char *ind; @@ -1374,7 +1396,6 @@ do_status_command_internal(status_cmd_t cmd) { int fd; int status; - int credit; int retry = 4; char buf[1024]; const stp_printer_t *printer; @@ -1407,33 +1428,15 @@ do_status_command_internal(status_cmd_t cmd) if (isnew) { - credit = askForCredit(fd, socket_id, &send_size, &receive_size); - if (credit < 0) - { - STP_DEBUG(fprintf(stderr, "\nCannot get credit\n")); - exit(1); - } /* request status command */ - status = writeData(fd, socket_id, (const unsigned char*)"st\1\0\1", - 5, 1); + status = + writeAndReadData(fd, socket_id, (const unsigned char*)"st\1\0\1", + 5, 1, (unsigned char *) buf, 1023, + &send_size, &receive_size, &test_for_st); if (status <= 0) { fprintf(stderr, _("\nCannot write to %s: %s\n"), raw_device, strerror(errno)); - exit(1); - } - do - { - status = readData(fd, socket_id, (unsigned char*)buf, 1023); - if (status < 0) - { - exit(1); - } - STP_DEBUG(fprintf(stderr, "readData try %d status %d\n", retry, status)); - } while ((retry-- != 0) && strncmp("st", buf, 2) && - strncmp("@BDC ST", buf, 7)); - /* "@BCD ST ST" found */ - if (!retry) - { + CloseChannel(fd, socket_id); exit(1); } buf[status] = '\0'; @@ -1482,8 +1485,6 @@ do_extended_ink_info(int extended_output) { int fd; int status; - int credit; - int retry = 4; char buf[1024]; unsigned val, id, id2, year, year2, month, month2; unsigned iv[6]; @@ -1533,16 +1534,11 @@ do_extended_ink_info(int extended_output) * message rather than from the ink list. This gives us a * last chance to determine the inks */ - credit = askForCredit(fd, socket_id, &send_size, &receive_size); - if (credit < 0) - { - stp_parameter_description_destroy(&desc); - STP_DEBUG(fprintf(stderr, "Cannot get credit\n")); - exit(1); - } /* request status command */ - status = writeData(fd, socket_id, (const unsigned char*)"st\1\0\1", - 5, 1); + status = + writeAndReadData(fd, socket_id, (const unsigned char*)"st\1\0\1", + 5, 1, (unsigned char *) buf, 1023, + &send_size, &receive_size, &test_for_st); if (status <= 0) { stp_parameter_description_destroy(&desc); @@ -1550,25 +1546,6 @@ do_extended_ink_info(int extended_output) raw_device, strerror(errno)); exit(1); } - do - { - status = readData(fd, socket_id, (unsigned char*)buf, 1023); - if (status < 0) - { - stp_parameter_description_destroy(&desc); - exit(1); - } - STP_DEBUG(fprintf(stderr, "readData try %d status %d\n", - retry, status)); - } - while ((retry-- != 0) && strncmp("st", buf, 2) && - strncmp("@BDC ST", buf, 7)); - /* "@BCD ST ST" found */ - if (!retry) - { - stp_parameter_description_destroy(&desc); - exit(1); - } buf[status] = '\0'; if ( buf[7] == '2' ) { @@ -1601,26 +1578,16 @@ do_extended_ink_info(int extended_output) for (i = 0; i < stp_string_list_count(color_list); i++) { char req[] = "ii\2\0\1\1"; - credit = askForCredit(fd, socket_id, &send_size, &receive_size); - if (credit < 0) - exit(1); req[5] = i + 1; - /* request status command */ - status = writeData(fd, socket_id, (const unsigned char*)req, 6, 1); + status = + writeAndReadData(fd, socket_id, (const unsigned char*)req, + 6, 1, (unsigned char *) buf, 1023, + &send_size, &receive_size, &test_for_ii); if (status <= 0) - exit(1); - retry = 4; - do { - status = readData(fd, socket_id, (unsigned char*) buf, 1023); - if (status < 0) - { - exit(1); - } - } while ((retry-- != 0) && strncmp("ii", buf, 2) && - strncmp("@BDC PS", buf, 7)); - if (!retry) /* couldn't read answer */ - exit(1); + CloseChannel(fd, socket_id); + exit(1); + } ind = strchr(buf, 'I'); if (!ind) printf("Cannot identify cartridge in slot %d\n", i); diff --git a/src/foomatic/foomatic-printermap b/src/foomatic/foomatic-printermap index ea353f1..ff2b87d 100644 --- a/src/foomatic/foomatic-printermap +++ b/src/foomatic/foomatic-printermap @@ -102,6 +102,7 @@ #gptofoo bjc-PIXMA-iP4200 printer/Canon-PIXMA-iP4200 #gptofoo bjc-PIXMA-iP4300 printer/Canon-PIXMA-iP4300 #gptofoo bjc-PIXMA-iP4500 printer/Canon-PIXMA-iP4500 +#gptofoo bjc-PIXMA-iP4600 printer/Canon-PIXMA-iP4600 #gptofoo bjc-PIXMA-iP5000 printer/Canon-PIXMA-iP5000 #gptofoo bjc-PIXMA-iP5200 printer/Canon-PIXMA-iP5200 #gptofoo bjc-PIXMA-iP5300 printer/Canon-PIXMA-iP5300 @@ -114,6 +115,7 @@ #gptofoo bjc-MULTIPASS-MP160 printer/Canon-MULTIPASS-MP160 #gptofoo bjc-MULTIPASS-MP170 printer/Canon-MULTIPASS-MP170 #gptofoo bjc-MULTIPASS-MP180 printer/Canon-MULTIPASS-MP180 +#gptofoo bjc-MULTIPASS-MP220 printer/Canon-MULTIPASS-MP220 #gptofoo bjc-MULTIPASS-MP500 printer/Canon-MULTIPASS-MP500 #gptofoo bjc-MULTIPASS-MP520 printer/Canon-MULTIPASS-MP520 #gptofoo bjc-MULTIPASS-MP610 printer/Canon-MULTIPASS-MP610 @@ -223,6 +225,7 @@ #gptofoo escp2-pma820 printer/Epson-PM_A820 #gptofoo escp2-pma890 printer/Epson-PM_A890 #gptofoo escp2-pma900 printer/Epson-PM_A900 +#gptofoo escp2-pma940 printer/Epson-PM_A940 #gptofoo escp2-pma950 printer/Epson-PM_A950 #gptofoo escp2-pmd1000 printer/Epson-PM_D1000 #gptofoo escp2-pmd600 printer/Epson-PM_D600 @@ -237,6 +240,7 @@ #gptofoo escp2-pmg820 printer/Epson-PM_G820 #gptofoo escp2-pmg850 printer/Epson-PM_G850 #gptofoo escp2-pmg4500 printer/Epson-PM_G4500 +#gptofoo escp2-pmt960 printer/Epson-PM_T960 #gptofoo escp2-px5500 printer/Epson-PX_5500 #gptofoo escp2-px7000 printer/Epson-PX_7000 #gptofoo escp2-px9000 printer/Epson-PX_9000 @@ -404,6 +408,7 @@ #gptofoo escp2-dx8450 printer/Epson-Stylus_DX8450 #gptofoo escp2-dx9400f printer/Epson-Stylus_DX9400F #gptofoo escp2-nx100 printer/Epson-Stylus_NX100 +#gptofoo escp2-nx105 printer/Epson-Stylus_NX105 #gptofoo escp2-nx200 printer/Epson-Stylus_NX200 #gptofoo escp2-nx300 printer/Epson-Stylus_NX300 #gptofoo escp2-nx400 printer/Epson-Stylus_NX400 @@ -503,6 +508,7 @@ #gptofoo escp2-scan2500 printer/Epson-Stylus_Scan_2500 #gptofoo escp2-px101 printer/Epson-PX_101 #gptofoo escp2-px201 printer/Epson-PX_201 +#gptofoo escp2-px401a printer/Epson-PX_401 #gptofoo escp2-px601f printer/Epson-PX_601F #gptofoo escp2-of-b30 printer/Epson-Stylus_Office_B30 #gptofoo escp2-of-b33 printer/Epson-Stylus_Office_B33 @@ -515,8 +521,10 @@ #gptofoo escp2-of-sx600fw printer/Epson-Stylus_Office_SX600FW #gptofoo escp2-of-tx600fw printer/Epson-Stylus_Office_TX600FW #gptofoo escp2-of-tx300f printer/Epson-Stylus_Office_TX300F +#gptofoo escp2-me300 printer/Epson-ME_300 #gptofoo escp2-meof70 printer/Epson-ME_Office_70 #gptofoo escp2-meof80w printer/Epson-ME_Office_80W +#gptofoo escp2-meof360 printer/Epson-ME_Office_360 #gptofoo escp2-meof700fw printer/Epson-ME_Office_700FW #gptofoo escp2-wf30 printer/Epson-WorkForce_30 #gptofoo escp2-wf40 printer/Epson-WorkForce_40 @@ -533,6 +541,13 @@ #gptofoo escp2-sx405 printer/Epson-Stylus_SX405 #gptofoo escp2-t20 printer/Epson-Stylus_T20 #gptofoo escp2-tx100 printer/Epson-Stylus_TX100 +#gptofoo escp2-tx101 printer/Epson-Stylus_TX101 +#gptofoo escp2-tx102 printer/Epson-Stylus_TX102 +#gptofoo escp2-tx103 printer/Epson-Stylus_TX103 +#gptofoo escp2-tx104 printer/Epson-Stylus_TX104 +#gptofoo escp2-tx105 printer/Epson-Stylus_TX105 +#gptofoo escp2-tx106 printer/Epson-Stylus_TX106 +#gptofoo escp2-tx109 printer/Epson-Stylus_TX109 #gptofoo escp2-tx200 printer/Epson-Stylus_TX200 #gptofoo escp2-tx400 printer/Epson-Stylus_TX400 #gptofoo escp2-tx700w printer/Epson-Stylus_Photo_TX700W diff --git a/src/main/canon-inks.h b/src/main/canon-inks.h index 1cd69fc..a86578d 100644 --- a/src/main/canon-inks.h +++ b/src/main/canon-inks.h @@ -117,6 +117,16 @@ static const stp_dotsize_t dotsizes_7l[] = { DECLARE_INK(3,7); +static const stp_dotsize_t dotsizes_6l[] = { + { 0x1, 0.2 }, + { 0x2, 0.4 }, + { 0x3, 0.6 }, + { 0x4, 0.8 }, + { 0x5, 1.0 } +}; + +DECLARE_INK(4,6); + static const stp_dotsize_t dotsizes_8l[] = { { 0x1, 0.14 }, { 0x2, 0.29 }, @@ -398,6 +408,38 @@ static const canon_inkset_t canon_11_C2M2Y2K2_inkset[] = { {0,0.0,NULL} }; +static const canon_inkset_t canon_13_C2M2Y2K2_inkset[] = { + {'C',1.0,&canon_1b_2l_ink}, + {'M',1.0,&canon_1b_2l_ink}, + {'Y',1.0,&canon_1b_2l_ink}, + {'K',1.0,&canon_1b_2l_ink}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, +}; + +static const canon_inkset_t canon_13_C2M2Y2K2k2_inkset[] = { + {'C',1.0,&canon_1b_2l_ink}, + {'M',1.0,&canon_1b_2l_ink}, + {'Y',1.0,&canon_1b_2l_ink}, + {'K',1.0,&canon_1b_2l_ink}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {'k',1.0,&canon_1b_2l_ink}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, +}; + static const canon_inkset_t canon_13_C3M3Y2K2_inkset[] = { {'C',1.0,&canon_2b_3l_ink}, {'M',1.0,&canon_2b_3l_ink}, @@ -430,6 +472,69 @@ static const canon_inkset_t canon_13_C3M3Y2K2k3_c_inkset[] = { {0,0.0,NULL}, }; +static const canon_inkset_t canon_13_C6M6Y4K2k4_inkset[] = { + {'C',1.0,&canon_4b_6l_ink}, + {'M',1.0,&canon_4b_6l_ink}, + {'Y',1.0,&canon_2b_4l_ink}, + {'K',1.0,&canon_1b_2l_ink}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {'k',0.0,&canon_2b_4l_ink}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, +}; + +static const canon_inkset_t canon_13_C6M6Y4k4yask_inkset[] = { + {'C',1.0,&canon_4b_6l_ink}, + {'M',1.0,&canon_4b_6l_ink}, + {'Y',1.0,&canon_2b_4l_ink}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {'k',1.0,&canon_2b_4l_ink}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, +}; + +static const canon_inkset_t canon_13_C8M8Y4K4k4_inkset[] = { + {'C',1.0,&canon_4b_8l_ink}, + {'M',1.0,&canon_4b_8l_ink}, + {'Y',1.0,&canon_2b_4l_ink}, + {'K',1.0,&canon_2b_4l_ink}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {'k',1.0,&canon_2b_4l_ink}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, +}; + +static const canon_inkset_t canon_13_C8M8Y4k4yask_inkset[] = { + {'C',1.0,&canon_4b_8l_ink}, + {'M',1.0,&canon_4b_8l_ink}, + {'Y',1.0,&canon_2b_4l_ink}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {'k',1.0,&canon_2b_4l_ink}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, + {0,0.0,NULL}, +}; static const canon_inkset_t canon_19_C3M3Y3k3_inkset[] = { {'C',1.0,&canon_2b_3l_ink}, diff --git a/src/main/canon-media.h b/src/main/canon-media.h index 11e5ef2..0db683f 100644 --- a/src/main/canon-media.h +++ b/src/main/canon-media.h @@ -72,6 +72,15 @@ static const canon_slot_t canon_PIXMA_iP4000_slots[] = { }; DECLARE_SLOTS(canon_PIXMA_iP4000); +static const canon_slot_t canon_PIXMA_iP4600_slots[] = { + { "AutoSwitch", N_ ("Automatic Paper Source Switching"), 0xe }, + { "Rear", N_ ("Rear tray"), 0x4 }, + { "Cassette", N_ ("Cassette"), 0x8 }, + { "Continuous", N_ ("Continuous autofeed (both)"), 0xf }, + { "CD", N_ ("CD tray"), 0xa } +}; +DECLARE_SLOTS(canon_PIXMA_iP4600); + /* media types */ typedef struct { @@ -79,6 +88,7 @@ typedef struct { const char *text; /* Translateable name */ unsigned char media_code_c; /* Media Code used for the ESC (c (SetColor) command */ unsigned char media_code_l; /* Media Code used for the ESC (l (SetTray) command */ + unsigned char media_code_P; /* Media Code used for the ESC (P (Unknown) command */ double base_density; double k_lower_scale; double k_upper; @@ -104,37 +114,59 @@ static const canon_paperlist_t name##_paperlist = { \ /* paperlists for the various printers. The first entry will be the default */ static const canon_paper_t canon_default_papers[] = { - { "Plain", N_ ("Plain Paper"), 0x00, 0x00,0.50, 0.25, 0.500, 0, 0, 0 }, - { "Transparency", N_ ("Transparencies"), 0x02, 0x02,1.00, 1.00, 0.900, 0, 0, 0 }, - { "BackPrint", N_ ("Back Print Film"), 0x03, 0x03,1.00, 1.00, 0.900, 0, 0, 0 }, - { "Fabric", N_ ("Fabric Sheets"), 0x04, 0x04,0.50, 0.25, 0.500, 0, 0, 0 }, - { "Envelope", N_ ("Envelope"), 0x08, 0x08,0.50, 0.25, 0.500, 0, 0, 0 }, - { "Coated", N_ ("High Resolution Paper"), 0x07, 0x07,0.78, 0.25, 0.500, 0, 0, 0 }, - { "TShirt", N_ ("T-Shirt Transfers"), 0x03, 0x03,0.50, 0.25, 0.500, 0, 0, 0 }, - { "GlossyFilm", N_ ("High Gloss Film"), 0x06, 0x06,1.00, 1.00, 0.999, 0, 0, 0 }, - { "GlossyPaper", N_ ("Glossy Photo Paper"), 0x05, 0x05,1.00, 1.00, 0.999, 0, 0, 0 }, - { "GlossyCard", N_ ("Glossy Photo Cards"), 0x0a, 0x0a,1.00, 1.00, 0.999, 0, 0, 0 }, - { "GlossyPro", N_ ("Photo Paper Pro"), 0x09, 0x09,1.00, 1.00, 0.999, 0, 0, 0 }, - { "Other", N_ ("Other"), 0x00, 0x00,0.50, 0.25, .5, 0, 0, 0 }, + { "Plain", N_ ("Plain Paper"), 0x00, 0x00,0x00,0.50, 0.25, 0.500, 0, 0, 0 }, + { "Transparency", N_ ("Transparencies"), 0x02, 0x02,0x00,1.00, 1.00, 0.900, 0, 0, 0 }, + { "BackPrint", N_ ("Back Print Film"), 0x03, 0x03,0x00,1.00, 1.00, 0.900, 0, 0, 0 }, + { "Fabric", N_ ("Fabric Sheets"), 0x04, 0x04,0x00,0.50, 0.25, 0.500, 0, 0, 0 }, + { "Envelope", N_ ("Envelope"), 0x08, 0x08,0x00,0.50, 0.25, 0.500, 0, 0, 0 }, + { "Coated", N_ ("High Resolution Paper"), 0x07, 0x07,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, + { "TShirt", N_ ("T-Shirt Transfers"), 0x03, 0x03,0x00,0.50, 0.25, 0.500, 0, 0, 0 }, + { "GlossyFilm", N_ ("High Gloss Film"), 0x06, 0x06,0x00,1.00, 1.00, 0.999, 0, 0, 0 }, + { "GlossyPaper", N_ ("Glossy Photo Paper"), 0x05, 0x05,0x00,1.00, 1.00, 0.999, 0, 0, 0 }, + { "GlossyCard", N_ ("Glossy Photo Cards"), 0x0a, 0x0a,0x00,1.00, 1.00, 0.999, 0, 0, 0 }, + { "GlossyPro", N_ ("Photo Paper Pro"), 0x09, 0x09,0x00,1.00, 1.00, 0.999, 0, 0, 0 }, + { "Other", N_ ("Other"), 0x00, 0x00,0x00,0.50, 0.25, .5, 0, 0, 0 }, }; DECLARE_PAPERS(canon_default); static const canon_paper_t canon_PIXMA_iP4000_papers[] = { - { "Plain", N_ ("Plain Paper"), 0x00,0x00,1.00, 0.25, 0.500, 0, 0, 0 }, - { "Transparency", N_ ("Transparencies"), 0x02,0x02,0.78, 0.25, 0.500, 0, 0, 0 }, - { "TShirt", N_ ("T-Shirt Transfers"), 0x03,0x03,0.78, 0.25, 0.500, 0, 0, 0 }, - { "GlossyPaper", N_ ("Glossy Photo Paper"), 0x05,0x05,0.78, 0.25, 0.500, 0, 0, 0 }, - { "Coated", N_ ("High Resolution Paper"), 0x07,0x07,0.78, 0.25, 0.500, 0, 0, 0 }, - { "Envelope", N_ ("Envelope"), 0x08,0x08,0.78, 0.25, 0.500, 0, 0, 0 }, - { "PhotopaperPro", N_ ("Professional Photo Paper"), 0x09,0x0d,0.78, 0.25, 0.500, 0, 0, 0 }, - { "PhotopaperMatte", N_ ("Photo Paper Matte"), 0x0a,0x10,0.78, 0.25, 0.500, 0, 0, 0 }, - { "PhotopaperPlus", N_ ("Glossy Photo Paper Plus"), 0x0b,0x11,0.78, 0.25, 0.500, 0, 0, 0 }, - { "CD", N_ ("CD"), 0x00,0x12,0.78, 0.25, 0.500, 0, 0, 0 }, + { "Plain", N_ ("Plain Paper"), 0x00,0x00,0x00,1.00, 0.25, 0.500, 0, 0, 0 }, + { "Transparency", N_ ("Transparencies"), 0x02,0x02,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, + { "TShirt", N_ ("T-Shirt Transfers"), 0x03,0x03,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, + { "GlossyPaper", N_ ("Glossy Photo Paper"), 0x05,0x05,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, + { "Coated", N_ ("High Resolution Paper"), 0x07,0x07,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, + { "Envelope", N_ ("Envelope"), 0x08,0x08,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, + { "PhotopaperPro", N_ ("Professional Photo Paper"), 0x09,0x0d,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, + { "PhotopaperMatte", N_ ("Photo Paper Matte"), 0x0a,0x10,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, + { "PhotopaperPlus", N_ ("Glossy Photo Paper Plus"), 0x0b,0x11,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, + { "CD", N_ ("CD"), 0x00,0x12,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, /* FIXME media code for c) should be 0x0c for CD but this will restrict CD printing to a single, not well supported, resolution */ - { "PhotopaperOther", N_ ("Other Photo Paper"), 0x0f,0x14,0.78, 0.25, 0.500, 0, 0, 0 }, - { "PhotopaperPlusDouble", N_ ("Photoper Plus Double-Sided"), 0x10,0x15,0.78, 0.25, 0.500, 0, 0, 0 }, + { "PhotopaperOther", N_ ("Other Photo Paper"), 0x0f,0x14,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, + { "PhotopaperPlusDouble", N_ ("Photoper Plus Double-Sided"), 0x10,0x15,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, }; DECLARE_PAPERS(canon_PIXMA_iP4000); + +static const canon_paper_t canon_PIXMA_iP4600_papers[] = { /* k_lower_scale *hue_adjustment *sat_adjustment */ + /* Name Text (c (l (P Density k_upper *lum_adjustment */ + { "Plain", N_ ("Plain Paper"), 0x00,0x00,0x00,0.78, 0.25, 0.500, 0, 0, 0 }, + { "PhotoPlusGloss2", N_ ("Photo Paper Plus Glossy II"), 0x1d,0x23,0x32,0.78, 0.25, 0.500, 0, 0, 0 }, + { "PhotoPro2", N_ ("Photo Paper Pro II"), 0x1f,0x25,0x34,0.78, 0.25, 0.500, 0, 0, 0 }, + { "PhotoProPlat", N_ ("Photo Paper Platinum"), 0x1e,0x24,0x33,0.78, 0.25, 0.500, 0, 0, 0 }, + { "PhotoProSemiGloss",N_ ("Photo Paper Plus Semi-gloss"), 0x1a,0x1f,0x2a,0.78, 0.25, 0.500, 0, 0, 0 }, + { "GlossyPhoto", N_ ("Glossy Photo Paper"), 0x05,0x05,0x16,0.78, 0.25, 0.500, 0, 0, 0 }, + { "MattePhoto", N_ ("Matte Photo Paper"), 0x0a,0x10,0x1c,0.78, 0.25, 0.500, 0, 0, 0 }, + { "HighResolution", N_ ("High Resolution Paper"), 0x07,0x07,0x10,0.78, 0.25, 0.500, 0, 0, 0 }, + { "InkJetHagaki", N_ ("Ink Jet Hagaki"), 0x0d,0x09,0x1b,0.78, 0.25, 0.500, 0, 0, 0 }, + { "Hagaki", N_ ("Hagaki"), 0x08,0x09,0x07,0.78, 0.25, 0.500, 0, 0, 0 }, + { "DiscCompat", N_ ("Printable Disc (Compatible)"), 0x0c,0x12,0x1f,0.78, 0.25, 0.500, 0, 0, 0 }, + { "DiscOthers", N_ ("Printable Disc (Other)"), 0x0c,0x12,0x20,0.78, 0.25, 0.500, 0, 0, 0 }, + { "TShirtTransfer", N_ ("T-Shirt Transfer"), 0x03,0x03,0x12,0.78, 0.25, 0.500, 0, 0, 0 }, + { "Envelope", N_ ("Envelope"), 0x08,0x08,0x08,0.78, 0.25, 0.500, 0, 0, 0 }, + { "Other", N_ ("Other Photo Paper"), 0x0f,0x14,0x24,0.78, 0.25, 0.500, 0, 0, 0 } +}; +DECLARE_PAPERS(canon_PIXMA_iP4600); + + #endif diff --git a/src/main/canon-printers.h b/src/main/canon-printers.h index cd44195..df48e0e 100644 --- a/src/main/canon-printers.h +++ b/src/main/canon-printers.h @@ -37,6 +37,7 @@ typedef struct canon_caps { int border_right; /* right margin, points */ int border_top; /* absolute top margin, points */ int border_bottom; /* absolute bottom margin, points */ + int raster_lines_per_block; /* number of raster lines in every F) command */ const canon_slotlist_t* slotlist; /*available paperslots */ unsigned long features; /* special bjl settings */ unsigned char ESC_r_arg; /* argument used for the ESC (r command during init */ @@ -174,6 +175,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA MP830", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_px,0,control_cmd_MULTIPASS_MP150, /*features */ &canon_MULTIPASS_MP830_modelist, @@ -202,6 +204,7 @@ static const canon_cap_t canon_model_capabilities[] = "S200", 3, 618, 936, /* 8.58" x 13 " */ 10, 10, 9, 20, + 8, &canon_default_slotlist, CANON_CAP_STD1 | CANON_CAP_rr,0x61,NULL, &canon_S200_modelist, @@ -216,6 +219,7 @@ static const canon_cap_t canon_model_capabilities[] = "S300", 3, 842, 17*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD1 | CANON_CAP_r,0x61,control_cmd_ackshort, &canon_BJC_8500_modelist, @@ -230,6 +234,7 @@ static const canon_cap_t canon_model_capabilities[] = "30", 1, 9.5*72, 14*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0 | CANON_CAP_a,0,NULL, &canon_BJC_30_modelist, @@ -243,6 +248,7 @@ static const canon_cap_t canon_model_capabilities[] = "85", 1, 9.5*72, 14*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0 | CANON_CAP_a,0,NULL, &canon_BJC_85_modelist, @@ -257,6 +263,7 @@ static const canon_cap_t canon_model_capabilities[] = "4300", 1, 618, 936, /* 8.58" x 13 " */ 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0,0,NULL, &canon_BJC_4300_modelist, @@ -271,6 +278,7 @@ static const canon_cap_t canon_model_capabilities[] = "4400", 1, 9.5*72, 14*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0 | CANON_CAP_a,0,NULL, &canon_BJC_4400_modelist, @@ -285,6 +293,7 @@ static const canon_cap_t canon_model_capabilities[] = "6000", 3, 618, 936, /* 8.58" x 13 " */ 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD1,0,control_cmd_ackshort, &canon_BJC_6000_modelist, @@ -299,6 +308,7 @@ static const canon_cap_t canon_model_capabilities[] = "6200", 3, 618, 936, /* 8.58" x 13 " */ 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD1,0,control_cmd_ackshort, &canon_BJC_6000_modelist, @@ -313,6 +323,7 @@ static const canon_cap_t canon_model_capabilities[] = "6500", 3, 842, 17*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD1,0,NULL, &canon_BJC_6000_modelist, @@ -326,6 +337,7 @@ static const canon_cap_t canon_model_capabilities[] = "8200", 3, 842, 17*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD1 | CANON_CAP_r,0x61,control_cmd_ackshort, &canon_BJC_8200_modelist, @@ -339,6 +351,7 @@ static const canon_cap_t canon_model_capabilities[] = "S500", 3, 842, 17*72, 10, 10, 15, 15, + 8, &canon_default_slotlist, CANON_CAP_STD0 | CANON_CAP_r | CANON_CAP_p,0x61,control_cmd_ackshort, &canon_S500_modelist, @@ -360,6 +373,7 @@ static const canon_cap_t canon_model_capabilities[] = "210", 1, 618, 936, /* 8.58" x 13 " */ 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0,0,NULL, &canon_BJC_210_modelist, @@ -373,6 +387,7 @@ static const canon_cap_t canon_model_capabilities[] = "240", 1, 618, 936, /* 8.58" x 13 " */ 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0,0,NULL, &canon_BJC_240_modelist, @@ -386,6 +401,7 @@ static const canon_cap_t canon_model_capabilities[] = "250", 1, 618, 936, /* 8.58" x 13 " */ 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0,0,NULL, &canon_BJC_240_modelist, @@ -399,6 +415,7 @@ static const canon_cap_t canon_model_capabilities[] = "1000", 1, 842, 17*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0 | CANON_CAP_a,0,NULL, &canon_BJC_240_modelist, @@ -412,6 +429,7 @@ static const canon_cap_t canon_model_capabilities[] = "2000", 1, 842, 17*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0 | CANON_CAP_a,0,NULL, &canon_BJC_2000_modelist, @@ -425,6 +443,7 @@ static const canon_cap_t canon_model_capabilities[] = "3000", 3, 842, 17*72, 10, 10, 9, 15, + 8, &canon_default_slotlist, CANON_CAP_STD0 | CANON_CAP_a | CANON_CAP_p,0,NULL, /*FIX? should have _r? */ &canon_BJC_3000_modelist, @@ -438,6 +457,7 @@ static const canon_cap_t canon_model_capabilities[] = "6100", 3, 842, 17*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD1 | CANON_CAP_a | CANON_CAP_r,0x61,NULL, &canon_BJC_3000_modelist, @@ -451,6 +471,7 @@ static const canon_cap_t canon_model_capabilities[] = "7000", 3, 842, 17*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD1,0,NULL, &canon_BJC_7000_modelist, @@ -464,6 +485,7 @@ static const canon_cap_t canon_model_capabilities[] = "i560", 3, 842, 17*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD1,0,NULL, &canon_BJC_i560_modelist, @@ -477,6 +499,7 @@ static const canon_cap_t canon_model_capabilities[] = "7100", 3, 842, 17*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0,0,NULL, &canon_BJC_7100_modelist, @@ -490,6 +513,7 @@ static const canon_cap_t canon_model_capabilities[] = "i80", 3, 842, 17*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0,0,NULL, &canon_BJC_i80_modelist, @@ -511,6 +535,7 @@ static const canon_cap_t canon_model_capabilities[] = "5100", 1, 17*72, 22*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0,0,NULL, &canon_BJC_3000_modelist, @@ -524,6 +549,7 @@ static const canon_cap_t canon_model_capabilities[] = "5500", 1, 22*72, 34*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0 | CANON_CAP_a,0,NULL, &canon_BJC_5500_modelist, @@ -537,6 +563,7 @@ static const canon_cap_t canon_model_capabilities[] = "6500", 3, 17*72, 22*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD1 | CANON_CAP_a,0,NULL, &canon_BJC_3000_modelist, @@ -550,6 +577,7 @@ static const canon_cap_t canon_model_capabilities[] = "8500", 3, 17*72, 22*72, 11, 9, 10, 18, + 8, &canon_default_slotlist, CANON_CAP_STD0,0,NULL, &canon_BJC_8500_modelist, @@ -563,6 +591,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA iP2000", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px,0x61,control_cmd_PIXMA_iP4000, /*features */ &canon_PIXMA_iP2000_modelist, @@ -576,6 +605,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA iP3000", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px,0x61,control_cmd_PIXMA_iP4000, /*features */ &canon_PIXMA_iP3000_modelist, @@ -589,6 +619,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA iP4000", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px /*|CANON_CAP_I*/,0x64,control_cmd_PIXMA_iP4000, /*features */ &canon_PIXMA_iP4000_modelist, @@ -602,6 +633,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA MP740", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_r|CANON_CAP_px /*,|CANON_CAP_I*/,0x64,control_cmd_PIXMA_iP4000, /*features */ &canon_PIXMA_iP4000_modelist, @@ -615,6 +647,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA iP5300", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px|CANON_CAP_I,0x64,control_cmd_PIXMA_iP4000, /*features */ &canon_PIXMA_iP5300_modelist, @@ -624,10 +657,25 @@ static const canon_cap_t canon_model_capabilities[] = NULL, NULL }, + { /* Canon PIXMA iP4600 */ + "PIXMA iP4600", 3, /*model, model_id*/ + 8.5*72, 26.625*72, /* max paper width and height */ + 10, 10, 9, 15, /*border_left, border_right, border_top, border_bottom */ + 16, + &canon_PIXMA_iP4600_slotlist, + CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px|CANON_CAP_I,0x61,control_cmd_MULTIPASS_MP150, /*features */ + &canon_PIXMA_iP5300_modelist, + &canon_PIXMA_iP4600_paperlist, + NULL, + NULL, + NULL, + iP4500_channel_order + }, { /* Canon PIXMA iP4500 */ "PIXMA iP4500", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px|CANON_CAP_I,0x61,control_cmd_MULTIPASS_MP150, /*features */ &canon_PIXMA_iP5300_modelist, @@ -641,6 +689,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA iP4200", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px|CANON_CAP_P,0x64,control_cmd_PIXMA_iP4200, /*features */ &canon_PIXMA_iP4200_modelist, @@ -653,6 +702,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA iP6000", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px,0x64,control_cmd_PIXMA_iP4000, /*features */ &canon_PIXMA_iP6000_modelist, @@ -666,6 +716,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA iP6700", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px,0x64,control_cmd_PIXMA_iP4000, /*features */ &canon_PIXMA_iP6700_modelist, @@ -679,6 +730,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA iX5000", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px|CANON_CAP_I,0x61,control_cmd_PIXMA_iP4000, /*features */ &canon_PIXMA_iX5000_modelist, @@ -692,6 +744,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA MP520", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px|CANON_CAP_I,0x61,control_cmd_PIXMA_iP4000, /*features */ &canon_PIXMA_iX5000_modelist, @@ -705,6 +758,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA Pro9500", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px,0x61,control_cmd_PIXMA_iP4000, /*features */ &canon_PIXMA_Pro9500_modelist, @@ -718,6 +772,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA iP8500", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px,0x61,control_cmd_PIXMA_iP4000, /*features */ &canon_PIXMA_iP8500_modelist, @@ -731,6 +786,7 @@ static const canon_cap_t canon_model_capabilities[] = "PIXMA MP150", 3, /*model, model_id*/ 842, 17*72, /* max paper width and height */ 10, 10, 15, 15, /*border_left, border_right, border_top, border_bottom */ + 8, &canon_PIXMA_iP4000_slotlist, CANON_CAP_STD0|CANON_CAP_DUPLEX|CANON_CAP_r|CANON_CAP_px|CANON_CAP_I,0x61,control_cmd_MULTIPASS_MP150, /*features */ &canon_MULTIPASS_MP150_modelist, diff --git a/src/main/print-canon.c b/src/main/print-canon.c index 6e085fb..149202e 100644 --- a/src/main/print-canon.c +++ b/src/main/print-canon.c @@ -1,5 +1,5 @@ /* - * "$Id: print-canon.c,v 1.229 2008/08/06 20:46:49 faust3 Exp $" + * "$Id: print-canon.c,v 1.230 2008/12/21 10:49:50 faust3 Exp $" * * Print plug-in CANON BJL driver for the GIMP. * @@ -70,7 +70,6 @@ -#define RASTER_LINES_PER_BLOCK 8 /* number of raster lines in every F) command */ @@ -1388,7 +1387,7 @@ canon_init_setMultiRaster(const stp_vars_t *v, const canon_privdata_t *init){ return; canon_cmd(v,ESC28,0x49, 1, 0x1); /* enable MultiLine Raster? */ - canon_cmd(v,ESC28,0x4a, 1, RASTER_LINES_PER_BLOCK); /* set number of lines per raster block */ + canon_cmd(v,ESC28,0x4a, 1, init->caps->raster_lines_per_block); /* set number of lines per raster block */ /* set the color sequence */ stp_zfwrite("\033(L", 3, 1, v); @@ -1427,7 +1426,7 @@ canon_init_printer(const stp_vars_t *v, const canon_privdata_t *init) mytop= (init->top*init->mode->ydpi)/72; if(init->caps->features & CANON_CAP_I) - mytop /= RASTER_LINES_PER_BLOCK; + mytop /= init->caps->raster_lines_per_block; if(mytop) canon_cmd(v,ESC28,0x65, 2, (mytop >> 8 ),(mytop & 255)); @@ -1912,7 +1911,7 @@ canon_do_print(stp_vars_t *v, stp_image_t *image) /* Allocate compression buffer */ if(caps->features & CANON_CAP_I) - privdata.comp_buf = stp_zalloc(privdata.buf_length_max * 2 * RASTER_LINES_PER_BLOCK * privdata.num_channels); /* for multiraster we need to buffer 8 lines for every color */ + privdata.comp_buf = stp_zalloc(privdata.buf_length_max * 2 * caps->raster_lines_per_block * privdata.num_channels); /* for multiraster we need to buffer 8 lines for every color */ else privdata.comp_buf = stp_zalloc(privdata.buf_length_max * 2); /* Allocate fold buffer */ @@ -2394,9 +2393,10 @@ static void canon_write_block(stp_vars_t* v,canon_privdata_t* pd,unsigned char* static void canon_write_multiraster(stp_vars_t *v,canon_privdata_t* pd,int y){ int i; - unsigned int max_length = 2*pd->buf_length_max * RASTER_LINES_PER_BLOCK; + int raster_lines_per_block = pd->caps->raster_lines_per_block; + unsigned int max_length = 2*pd->buf_length_max * raster_lines_per_block; /* a new raster block begins */ - if(!(y % RASTER_LINES_PER_BLOCK)){ + if(!(y % raster_lines_per_block)){ if(y != 0){ /* write finished blocks */ for(i=0;inum_channels;i++) @@ -2414,9 +2414,9 @@ static void canon_write_multiraster(stp_vars_t *v,canon_privdata_t* pd,int y){ } if(y == pd->out_height - 1){ /* we just compressed our last line */ - if(pd->out_height % RASTER_LINES_PER_BLOCK){ + if(pd->out_height % raster_lines_per_block){ /* but our raster block is not finished yet */ - int missing = RASTER_LINES_PER_BLOCK - (pd->out_height % RASTER_LINES_PER_BLOCK); /* calculate missing lines */ + int missing = raster_lines_per_block - (pd->out_height % raster_lines_per_block); /* calculate missing lines */ for(i=0;inum_channels;i++){ /* add missing empty lines and write blocks */ int x; diff --git a/src/main/print-escp2-data.c b/src/main/print-escp2-data.c index 5a51947..ec2230d 100644 --- a/src/main/print-escp2-data.c +++ b/src/main/print-escp2-data.c @@ -1,5 +1,5 @@ /* - * "$Id: print-escp2-data.c,v 1.270 2008/07/16 02:00:17 rlk Exp $" + * "$Id: print-escp2-data.c,v 1.271 2008/11/22 20:28:04 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -65,6 +65,10 @@ load_model_from_file(const stp_vars_t *v, stp_mxml_node_t *xmod, int model) p->max_black_resolution = -1; p->cd_x_offset = -1; p->cd_y_offset = -1; + p->duplex_left_margin = SHRT_MIN; + p->duplex_right_margin = SHRT_MIN; + p->duplex_top_margin = SHRT_MIN; + p->duplex_bottom_margin = SHRT_MIN; while (tmp) { if (tmp->type == STP_MXML_ELEMENT) @@ -217,6 +221,7 @@ load_model_from_file(const stp_vars_t *v, stp_mxml_node_t *xmod, int model) { const char *itype = stp_mxmlElementGetAttr(tmp, "interleave"); const char *mtype = stp_mxmlElementGetAttr(tmp, "media"); + const char *dtype = stp_mxmlElementGetAttr(tmp, "duplex"); unsigned long data[4]; int i = 0; while (child && i < 4) @@ -225,8 +230,15 @@ load_model_from_file(const stp_vars_t *v, stp_mxml_node_t *xmod, int model) data[i++] = stp_xmlstrtoul(child->value.text.string); child = child->next; } - if (itype && !strcmp(itype, "soft") && - mtype && !strcmp(mtype, "sheet")) + if (dtype && !strcmp(dtype, "duplex")) + { + p->duplex_left_margin = data[0]; + p->duplex_right_margin = data[1]; + p->duplex_top_margin = data[2]; + p->duplex_bottom_margin = data[3]; + } + else if (itype && !strcmp(itype, "soft") && + mtype && !strcmp(mtype, "sheet")) { p->left_margin = data[0]; p->right_margin = data[1]; diff --git a/src/main/print-escp2.c b/src/main/print-escp2.c index 1aebc0a..096fb43 100644 --- a/src/main/print-escp2.c +++ b/src/main/print-escp2.c @@ -1,5 +1,5 @@ /* - * "$Id: print-escp2.c,v 1.414 2008/07/26 15:16:15 rlk Exp $" + * "$Id: print-escp2.c,v 1.416 2008/11/22 20:34:29 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -1000,6 +1000,34 @@ escp2_quality_list(const stp_vars_t *v) return printdef->quality_list; } +static short +escp2_duplex_left_margin(const stp_vars_t *v) +{ + stpi_escp2_printer_t *printdef = stp_escp2_get_printer(v); + return printdef->duplex_left_margin; +} + +static short +escp2_duplex_right_margin(const stp_vars_t *v) +{ + stpi_escp2_printer_t *printdef = stp_escp2_get_printer(v); + return printdef->duplex_right_margin; +} + +static short +escp2_duplex_top_margin(const stp_vars_t *v) +{ + stpi_escp2_printer_t *printdef = stp_escp2_get_printer(v); + return printdef->duplex_top_margin; +} + +static short +escp2_duplex_bottom_margin(const stp_vars_t *v) +{ + stpi_escp2_printer_t *printdef = stp_escp2_get_printer(v); + return printdef->duplex_bottom_margin; +} + static const channel_count_t * get_channel_count_by_name(const char *name) { @@ -2594,6 +2622,7 @@ internal_imageable_area(const stp_vars_t *v, int use_paper_margins, int rollfeed = 0; /* Roll feed selected */ int cd = 0; /* CD selected */ const char *media_size = stp_get_string_parameter(v, "PageSize"); + const char *duplex = stp_get_string_parameter(v, "Duplex"); int left_margin = 0; int right_margin = 0; int bottom_margin = 0; @@ -2677,6 +2706,14 @@ internal_imageable_area(const stp_vars_t *v, int use_paper_margins, } } } + if (!use_maximum_area && duplex && strcmp(duplex, "None") != 0) + { + left_margin = imax(left_margin, escp2_duplex_left_margin(v)); + right_margin = imax(right_margin, escp2_duplex_right_margin(v)); + bottom_margin = imax(bottom_margin, escp2_duplex_bottom_margin(v)); + top_margin = imax(top_margin, escp2_duplex_top_margin(v)); + } + if (width > escp2_max_imageable_width(v)) width = escp2_max_imageable_width(v); if (height > escp2_max_imageable_height(v)) diff --git a/src/main/print-escp2.h b/src/main/print-escp2.h index c4a8ef9..4f27add 100644 --- a/src/main/print-escp2.h +++ b/src/main/print-escp2.h @@ -1,5 +1,5 @@ /* - * "$Id: print-escp2.h,v 1.132 2008/07/11 01:24:25 rlk Exp $" + * "$Id: print-escp2.h,v 1.133 2008/11/22 20:28:04 rlk Exp $" * * Print plug-in EPSON ESC/P2 driver for the GIMP. * @@ -401,6 +401,11 @@ typedef struct escp2_printer short m_roll_right_margin; /* Right margin, points */ short m_roll_top_margin; /* Absolute top margin, points */ short m_roll_bottom_margin; /* Absolute bottom margin, points */ + /* Duplex margin limit (SHRT_MIN = no limit): */ + short duplex_left_margin; /* Left margin, points */ + short duplex_right_margin; /* Right margin, points */ + short duplex_top_margin; /* Absolute top margin, points */ + short duplex_bottom_margin; /* Absolute bottom margin, points */ /* Print directly to CD */ short cd_x_offset; /* Center of CD (horizontal offset) */ short cd_y_offset; /* Center of CD (vertical offset) */ @@ -609,5 +614,5 @@ extern void stpi_escp2_terminate_page(stp_vars_t *v); #endif /* GUTENPRINT_INTERNAL_ESCP2_H */ /* - * End of "$Id: print-escp2.h,v 1.132 2008/07/11 01:24:25 rlk Exp $". + * End of "$Id: print-escp2.h,v 1.133 2008/11/22 20:28:04 rlk Exp $". */ diff --git a/src/testpattern/testpatterny.c b/src/testpattern/testpatterny.c index 10fac48..1b62843 100644 --- a/src/testpattern/testpatterny.c +++ b/src/testpattern/testpatterny.c @@ -217,6 +217,7 @@ static color_t color_map[] = { "l_cyan", 5 }, { "l_magenta", 6 }, { "d_yellow", 4 }, + { "l_l_black", 7 }, { NULL, -1 } }; @@ -270,7 +271,7 @@ typedef int YYSTYPE; /* Line 216 of yacc.c. */ -#line 274 "testpatterny.c" +#line 275 "testpatterny.c" #ifdef short # undef short @@ -603,20 +604,20 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 144, 144, 144, 144, 144, 145, 145, 145, 145, - 147, 147, 150, 162, 174, 186, 198, 210, 222, 234, - 234, 234, 234, 234, 234, 234, 237, 240, 250, 259, - 269, 278, 285, 292, 299, 308, 317, 326, 326, 329, - 339, 348, 357, 366, 380, 380, 380, 380, 380, 382, - 389, 396, 403, 410, 417, 425, 433, 448, 448, 451, - 451, 454, 457, 471, 484, 484, 487, 487, 490, 490, - 493, 493, 496, 511, 514, 529, 540, 557, 563, 570, - 578, 587, 598, 598, 598, 598, 598, 601, 604, 613, - 618, 618, 621, 624, 628, 632, 632, 632, 632, 632, - 632, 633, 633, 633, 633, 633, 633, 633, 634, 634, - 634, 634, 634, 634, 635, 635, 635, 638, 642, 642, - 642, 642, 645, 649, 649, 652, 656, 656, 659, 659, - 662, 662, 667, 666 + 0, 145, 145, 145, 145, 145, 146, 146, 146, 146, + 148, 148, 151, 163, 175, 187, 199, 211, 223, 235, + 235, 235, 235, 235, 235, 235, 238, 241, 251, 260, + 270, 279, 286, 293, 300, 309, 318, 327, 327, 330, + 340, 349, 358, 367, 381, 381, 381, 381, 381, 383, + 390, 397, 404, 411, 418, 426, 434, 449, 449, 452, + 452, 455, 458, 472, 485, 485, 488, 488, 491, 491, + 494, 494, 497, 512, 515, 530, 541, 558, 564, 571, + 579, 588, 599, 599, 599, 599, 599, 602, 605, 614, + 619, 619, 622, 625, 629, 633, 633, 633, 633, 633, + 633, 634, 634, 634, 634, 634, 634, 634, 635, 635, + 635, 635, 635, 635, 636, 636, 636, 639, 643, 643, + 643, 643, 646, 650, 650, 653, 657, 657, 660, 660, + 663, 663, 668, 667 }; #endif @@ -1671,7 +1672,7 @@ yyreduce: switch (yyn) { case 12: -#line 151 "testpatterny.y" +#line 152 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>cmykspec %d\n", (yyvsp[(2) - (2)].ival)); @@ -1684,7 +1685,7 @@ yyreduce: break; case 13: -#line 163 "testpatterny.y" +#line 164 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>kcmyspec %d\n", (yyvsp[(2) - (2)].ival)); @@ -1697,7 +1698,7 @@ yyreduce: break; case 14: -#line 175 "testpatterny.y" +#line 176 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>rgbspec %d\n", (yyvsp[(2) - (2)].ival)); @@ -1710,7 +1711,7 @@ yyreduce: break; case 15: -#line 187 "testpatterny.y" +#line 188 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>cmyspec %d\n", (yyvsp[(2) - (2)].ival)); @@ -1723,7 +1724,7 @@ yyreduce: break; case 16: -#line 199 "testpatterny.y" +#line 200 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>grayspec %d\n", (yyvsp[(2) - (2)].ival)); @@ -1736,7 +1737,7 @@ yyreduce: break; case 17: -#line 211 "testpatterny.y" +#line 212 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>whitespec %d\n", (yyvsp[(2) - (2)].ival)); @@ -1749,7 +1750,7 @@ yyreduce: break; case 18: -#line 223 "testpatterny.y" +#line 224 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>extendedspec %d\n", (yyvsp[(2) - (3)].ival)); @@ -1762,7 +1763,7 @@ yyreduce: break; case 27: -#line 241 "testpatterny.y" +#line 242 "testpatterny.y" { int channel = find_color((yyvsp[(2) - (3)]).sval); if (getenv("STP_TESTPATTERN_DEBUG")) @@ -1773,7 +1774,7 @@ yyreduce: break; case 28: -#line 251 "testpatterny.y" +#line 252 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>channel_level %d %f\n", (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)]).dval); @@ -1783,7 +1784,7 @@ yyreduce: break; case 29: -#line 260 "testpatterny.y" +#line 261 "testpatterny.y" { int channel = find_color((yyvsp[(2) - (3)]).sval); if (getenv("STP_TESTPATTERN_DEBUG")) @@ -1794,7 +1795,7 @@ yyreduce: break; case 30: -#line 270 "testpatterny.y" +#line 271 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>channel_gamma %d %f\n", (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)]).dval); @@ -1804,7 +1805,7 @@ yyreduce: break; case 31: -#line 279 "testpatterny.y" +#line 280 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>global_gamma %f\n", (yyvsp[(2) - (2)]).dval); @@ -1813,7 +1814,7 @@ yyreduce: break; case 32: -#line 286 "testpatterny.y" +#line 287 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>steps %d\n", (yyvsp[(2) - (2)].ival)); @@ -1822,7 +1823,7 @@ yyreduce: break; case 33: -#line 293 "testpatterny.y" +#line 294 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>ink_limit %f\n", (yyvsp[(2) - (2)]).dval); @@ -1831,7 +1832,7 @@ yyreduce: break; case 34: -#line 300 "testpatterny.y" +#line 301 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>printer %s\n", (yyvsp[(2) - (2)].sval)); @@ -1841,7 +1842,7 @@ yyreduce: break; case 35: -#line 309 "testpatterny.y" +#line 310 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>page_size_name %s\n", (yyvsp[(2) - (2)].sval)); @@ -1851,7 +1852,7 @@ yyreduce: break; case 36: -#line 318 "testpatterny.y" +#line 319 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>page_size_custom %d %d\n", (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].ival)); @@ -1861,7 +1862,7 @@ yyreduce: break; case 39: -#line 330 "testpatterny.y" +#line 331 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>parameter_string %s %s\n", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval)); @@ -1872,7 +1873,7 @@ yyreduce: break; case 40: -#line 340 "testpatterny.y" +#line 341 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>parameter_int %s %d\n", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].ival)); @@ -1882,7 +1883,7 @@ yyreduce: break; case 41: -#line 349 "testpatterny.y" +#line 350 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>parameter_bool %s %d\n", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].ival)); @@ -1892,7 +1893,7 @@ yyreduce: break; case 42: -#line 358 "testpatterny.y" +#line 359 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>parameter_float %s %f\n", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)]).dval); @@ -1902,7 +1903,7 @@ yyreduce: break; case 43: -#line 367 "testpatterny.y" +#line 368 "testpatterny.y" { stp_curve_t *curve = stp_curve_create_from_string((yyvsp[(3) - (3)].sval)); if (getenv("STP_TESTPATTERN_DEBUG")) @@ -1917,7 +1918,7 @@ yyreduce: break; case 49: -#line 383 "testpatterny.y" +#line 384 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>density %f\n", (yyvsp[(2) - (2)]).dval); @@ -1926,7 +1927,7 @@ yyreduce: break; case 50: -#line 390 "testpatterny.y" +#line 391 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>top %f\n", (yyvsp[(2) - (2)]).dval); @@ -1935,7 +1936,7 @@ yyreduce: break; case 51: -#line 397 "testpatterny.y" +#line 398 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>left %f\n", (yyvsp[(2) - (2)]).dval); @@ -1944,7 +1945,7 @@ yyreduce: break; case 52: -#line 404 "testpatterny.y" +#line 405 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>hsize %f\n", (yyvsp[(2) - (2)]).dval); @@ -1953,7 +1954,7 @@ yyreduce: break; case 53: -#line 411 "testpatterny.y" +#line 412 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>vsize %f\n", (yyvsp[(2) - (2)]).dval); @@ -1962,7 +1963,7 @@ yyreduce: break; case 54: -#line 418 "testpatterny.y" +#line 419 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>blackline %d\n", (yyvsp[(2) - (2)].ival)); @@ -1971,7 +1972,7 @@ yyreduce: break; case 55: -#line 426 "testpatterny.y" +#line 427 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>noscale %d\n", (yyvsp[(2) - (2)].ival)); @@ -1980,7 +1981,7 @@ yyreduce: break; case 56: -#line 434 "testpatterny.y" +#line 435 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>color_block1 %f %f %f (%d)\n", (yyvsp[(1) - (3)]).dval, (yyvsp[(2) - (3)]).dval, (yyvsp[(3) - (3)]).dval, @@ -1996,7 +1997,7 @@ yyreduce: break; case 62: -#line 458 "testpatterny.y" +#line 459 "testpatterny.y" { int channel = find_color((yyvsp[(1) - (4)]).sval); if (getenv("STP_TESTPATTERN_DEBUG")) @@ -2011,7 +2012,7 @@ yyreduce: break; case 63: -#line 472 "testpatterny.y" +#line 473 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>color_block2b %d %f %f %f\n", (yyvsp[(2) - (5)].ival), (yyvsp[(3) - (5)]).dval, (yyvsp[(4) - (5)]).dval, (yyvsp[(5) - (5)]).dval); @@ -2025,7 +2026,7 @@ yyreduce: break; case 72: -#line 497 "testpatterny.y" +#line 498 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>patvars %f %f %f %f %f\n", (yyvsp[(1) - (5)]).dval, (yyvsp[(2) - (5)]).dval, (yyvsp[(3) - (5)]).dval, (yyvsp[(4) - (5)]).dval, (yyvsp[(5) - (5)]).dval); @@ -2041,7 +2042,7 @@ yyreduce: break; case 74: -#line 515 "testpatterny.y" +#line 516 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>xpattern\n"); @@ -2057,7 +2058,7 @@ yyreduce: break; case 75: -#line 530 "testpatterny.y" +#line 531 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>grid %d\n", (yyvsp[(2) - (2)].ival)); @@ -2069,7 +2070,7 @@ yyreduce: break; case 76: -#line 541 "testpatterny.y" +#line 542 "testpatterny.y" { if (getenv("STP_TESTPATTERN_DEBUG")) fprintf(stderr, ">>>image %d %d\n", (yyvsp[(2) - (3)].ival), (yyvsp[(3) - (3)].ival)); @@ -2087,7 +2088,7 @@ yyreduce: break; case 77: -#line 558 "testpatterny.y" +#line 559 "testpatterny.y" { fprintf(stderr,"%s",(yyvsp[(2) - (2)].sval)); free((yyvsp[(2) - (2)].sval)); @@ -2095,7 +2096,7 @@ yyreduce: break; case 78: -#line 564 "testpatterny.y" +#line 565 "testpatterny.y" { fprintf(stderr,"%s%s", (yyvsp[(2) - (3)].sval), (yyvsp[(3) - (3)].sval)); free((yyvsp[(2) - (3)].sval)); @@ -2104,7 +2105,7 @@ yyreduce: break; case 79: -#line 571 "testpatterny.y" +#line 572 "testpatterny.y" { fprintf(stderr,"%s%s%s", (yyvsp[(2) - (4)].sval), (yyvsp[(3) - (4)].sval), (yyvsp[(4) - (4)].sval)); free((yyvsp[(2) - (4)].sval)); @@ -2114,7 +2115,7 @@ yyreduce: break; case 80: -#line 579 "testpatterny.y" +#line 580 "testpatterny.y" { fprintf(stderr, "%s%s%s%s", (yyvsp[(2) - (5)].sval), (yyvsp[(3) - (5)].sval), (yyvsp[(4) - (5)].sval), (yyvsp[(5) - (5)].sval)); free((yyvsp[(2) - (5)].sval)); @@ -2125,7 +2126,7 @@ yyreduce: break; case 81: -#line 588 "testpatterny.y" +#line 589 "testpatterny.y" { fprintf(stderr, "%s%s%s%s%s", (yyvsp[(2) - (6)].sval), (yyvsp[(3) - (6)].sval), (yyvsp[(4) - (6)].sval), (yyvsp[(5) - (6)].sval), (yyvsp[(6) - (6)].sval)); free((yyvsp[(2) - (6)].sval)); @@ -2137,7 +2138,7 @@ yyreduce: break; case 88: -#line 605 "testpatterny.y" +#line 606 "testpatterny.y" { close_output(); if (global_output) @@ -2148,44 +2149,44 @@ yyreduce: break; case 89: -#line 614 "testpatterny.y" +#line 615 "testpatterny.y" { global_output = (yyvsp[(2) - (2)].sval); } break; case 93: -#line 625 "testpatterny.y" +#line 626 "testpatterny.y" { start_job = 1; } break; case 94: -#line 629 "testpatterny.y" +#line 630 "testpatterny.y" { end_job = 1; } break; case 117: -#line 639 "testpatterny.y" +#line 640 "testpatterny.y" { global_did_something = 1; } break; case 122: -#line 646 "testpatterny.y" +#line 647 "testpatterny.y" { global_did_something = 1; } break; case 125: -#line 653 "testpatterny.y" +#line 654 "testpatterny.y" { global_did_something = 1; } break; case 131: -#line 663 "testpatterny.y" +#line 664 "testpatterny.y" { return 0; } break; case 132: -#line 667 "testpatterny.y" +#line 668 "testpatterny.y" { current_testpattern = get_next_testpattern(); } @@ -2193,7 +2194,7 @@ yyreduce: /* Line 1267 of yacc.c. */ -#line 2197 "testpatterny.c" +#line 2198 "testpatterny.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2407,6 +2408,6 @@ yyreturn: } -#line 673 "testpatterny.y" +#line 674 "testpatterny.y" diff --git a/src/testpattern/testpatterny.y b/src/testpattern/testpatterny.y index fcd7401..7682d8d 100644 --- a/src/testpattern/testpatterny.y +++ b/src/testpattern/testpatterny.y @@ -1,5 +1,5 @@ /* - * "$Id: testpatterny.y,v 1.32 2008/06/08 01:03:51 rlk Exp $" + * "$Id: testpatterny.y,v 1.33 2008/12/07 20:03:08 rlk Exp $" * * Test pattern generator for Gimp-Print * @@ -64,6 +64,7 @@ static color_t color_map[] = { "l_cyan", 5 }, { "l_magenta", 6 }, { "d_yellow", 4 }, + { "l_l_black", 7 }, { NULL, -1 } }; diff --git a/src/xml/escp2/inks/Makefile.am b/src/xml/escp2/inks/Makefile.am index cbf259d..5095c6a 100644 --- a/src/xml/escp2/inks/Makefile.am +++ b/src/xml/escp2/inks/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.6 2008/10/24 00:37:14 rleigh Exp $ +## $Id: Makefile.am,v 1.7 2008/12/07 20:03:09 rlk Exp $ ## Copyright (C) 2008 Robert Krawitz ## ## This program is free software; you can redistribute it and/or modify @@ -26,6 +26,7 @@ include $(top_srcdir)/scripts/global.mk pkgxmldatadir = $(pkgdatadir)/@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@/xml/escp2/inks pkgxmldata_DATA = \ + artisan.xml \ b500.xml \ c120.xml \ c64.xml \ diff --git a/src/xml/escp2/inks/Makefile.in b/src/xml/escp2/inks/Makefile.in index a6b3a94..904de98 100644 --- a/src/xml/escp2/inks/Makefile.in +++ b/src/xml/escp2/inks/Makefile.in @@ -274,6 +274,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS GUTENPRINTUI_LIBS = $(top_builddir)/src/gutenprintui/libgutenprintui.la pkgxmldatadir = $(pkgdatadir)/@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@/xml/escp2/inks pkgxmldata_DATA = \ + artisan.xml \ b500.xml \ c120.xml \ c64.xml \ diff --git a/src/xml/escp2/inks/artisan.xml b/src/xml/escp2/inks/artisan.xml new file mode 100644 index 0000000..791f6e1 --- /dev/null +++ b/src/xml/escp2/inks/artisan.xml @@ -0,0 +1,285 @@ + + + + + * Copyright 2008 Robert Krawitz (rlk@alum.mit.edu) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + + + + 1.000000 + 1.000000 0.350000 + 1.000000 0.330000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/xml/escp2/inputslots/Makefile.am b/src/xml/escp2/inputslots/Makefile.am index 2b5d35e..68b80b6 100644 --- a/src/xml/escp2/inputslots/Makefile.am +++ b/src/xml/escp2/inputslots/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.3 2008/10/24 00:37:14 rleigh Exp $ +## $Id: Makefile.am,v 1.5 2008/12/10 00:44:12 rlk Exp $ ## Copyright (C) 2008 Robert Krawitz ## ## This program is free software; you can redistribute it and/or modify @@ -26,6 +26,7 @@ include $(top_srcdir)/scripts/global.mk pkgxmldatadir = $(pkgdatadir)/@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@/xml/escp2/inputslots pkgxmldata_DATA = \ + artisan.xml \ b500.xml \ cd_cutter_roll_feed.xml \ cd_roll_feed.xml \ @@ -34,6 +35,7 @@ pkgxmldata_DATA = \ pro_roll_feed.xml \ r1800.xml \ r2400.xml \ + rx680.xml \ rx700.xml \ spro5000.xml \ standard_roll_feed.xml diff --git a/src/xml/escp2/inputslots/Makefile.in b/src/xml/escp2/inputslots/Makefile.in index 6663e4f..4d7e430 100644 --- a/src/xml/escp2/inputslots/Makefile.in +++ b/src/xml/escp2/inputslots/Makefile.in @@ -274,6 +274,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(LOCAL_CPPFLAGS GUTENPRINTUI_LIBS = $(top_builddir)/src/gutenprintui/libgutenprintui.la pkgxmldatadir = $(pkgdatadir)/@GUTENPRINT_MAJOR_VERSION@.@GUTENPRINT_MINOR_VERSION@/xml/escp2/inputslots pkgxmldata_DATA = \ + artisan.xml \ b500.xml \ cd_cutter_roll_feed.xml \ cd_roll_feed.xml \ @@ -282,6 +283,7 @@ pkgxmldata_DATA = \ pro_roll_feed.xml \ r1800.xml \ r2400.xml \ + rx680.xml \ rx700.xml \ spro5000.xml \ standard_roll_feed.xml diff --git a/src/xml/escp2/inputslots/artisan.xml b/src/xml/escp2/inputslots/artisan.xml new file mode 100644 index 0000000..cefc25f --- /dev/null +++ b/src/xml/escp2/inputslots/artisan.xml @@ -0,0 +1,40 @@ + + + + + * Copyright 2008 Robert Krawitz (rlk@alum.mit.edu) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + + + + + PP\003\000\000\001\001 + + + + + PP\003\000\000\001\002 + + + + + PP\003\000\000\002\001 + + + diff --git a/src/xml/escp2/inputslots/rx680.xml b/src/xml/escp2/inputslots/rx680.xml new file mode 100644 index 0000000..64bf344 --- /dev/null +++ b/src/xml/escp2/inputslots/rx680.xml @@ -0,0 +1,40 @@ + + + + + * Copyright 2008 Robert Krawitz (rlk@alum.mit.edu) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + + + + + PP\003\000\000\001\000 + + + + + PP\003\000\000\001\001 + + + + + PP\003\000\000\002\001 + + + diff --git a/src/xml/escp2/media/Makefile.am b/src/xml/escp2/media/Makefile.am index 245751f..731a904 100644 --- a/src/xml/escp2/media/Makefile.am +++ b/src/xml/escp2/media/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.9 2008/10/24 00:37:14 rleigh Exp $ +## $Id: Makefile.am,v 1.10 2008/12/20 02:51:54 rlk Exp $ ## Copyright (C) 2008 Robert Krawitz ## ## This program is free software; you can redistribute it and/or modify @@ -42,6 +42,7 @@ pkgxmldata_DATA = \ f360_photo7_japan.xml \ f360_ultrachrome.xml \ f360_ultrachrome_k3.xml \ + nx100.xml \ photo_gen0.xml \ photo_gen1.xml \ photo_gen2.xml \ diff --git a/src/xml/escp2/media/Makefile.in b/src/xml/escp2/media/Makefile.in index 85487c4..f955a7d 100644 --- a/src/xml/escp2/media/Makefile.in +++ b/src/xml/escp2/media/Makefile.in @@ -290,6 +290,7 @@ pkgxmldata_DATA = \ f360_photo7_japan.xml \ f360_ultrachrome.xml \ f360_ultrachrome_k3.xml \ + nx100.xml \ photo_gen0.xml \ photo_gen1.xml \ photo_gen2.xml \ diff --git a/src/xml/escp2/media/nx100.xml b/src/xml/escp2/media/nx100.xml new file mode 100644 index 0000000..e52e1bc --- /dev/null +++ b/src/xml/escp2/media/nx100.xml @@ -0,0 +1,980 @@ + + + + + * Copyright 2008 Robert Krawitz (rlk@alum.mit.edu) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + + + + + + + + + 0 0 0 -0.02 -0.04 -0.08 -0.12 -0.16 + -0.2 -0.24 -0.28 -0.32 -0.36 -0.37 -0.38 -0.39 + -0.4 -0.45 -0.5 -0.52 -0.52 -0.5 -0.45 -0.4 + -0.35 -0.27 -0.15 -0.06 0 0 0 0 + 0 0 -0.03 -0.06 -0.09 -0.13 -0.17 -0.21 + -0.25 -0.22 -0.19 -0.16 -0.13 -0.1 -0.07 -0.03 + + + + + + + 0.63 0.64 0.66 0.69 0.73 0.78 0.82 0.85 + 0.85 0.82 0.78 0.78 0.79 0.8 0.82 0.85 + 0.87 0.9 0.94 0.97 1 1 1 1 + 1 1 1 1 1 1 1 1 + 1 1 1 0.99 0.98 0.97 0.95 0.93 + 0.9 0.76 0.68 0.65 0.64 0.63 0.63 0.63 + + + + + + + 1.2 1.2 1.3 1.5 1.7 1.9 2 2 + 2 2 2 2 2 2 2 2 + 2 1.8 1.6 1.4 1.2 1 1 1 + 1 1 1 1 1 1 1 1 + 1 1.15 1.4 1.7 2 2.3 2.4 2.4 + 2.4 2.4 2.4 2.3 2 1.7 1.4 1.15 + + + + + + 0 + 0x30 + + + 0x10 + + + 0x21 + + + 0x30 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + + 0.720000 + 0.500000 + 0.750000 + 0.050000 + 0.900000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 5 + 0x30 + + + 0x10 + + + 0x21 + + + 0x30 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + + 0.720000 + 0.750000 + 1.000000 + 0.050000 + 0.900000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 7 + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + + 0.830000 + 1.000000 + 1.000000 + 0.050000 + 0.999000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 9 + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + + 0.830000 + 0.750000 + 1.000000 + 0.050000 + 0.999000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 37 + 0x30 + + + 0x20 + + + 0x20 + + + 0x30 + + + 0x30 + + + 0x30 + + + 0x30 + + + 0x30 + + + 0x30 + + + 0x30 + + + 0x30 + + + + 0.720000 + 0.750000 + 1.000000 + 0.050000 + 0.900000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 10 + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + 0x51 + + + + 0.830000 + 0.750000 + 1.000000 + 0.050000 + 0.999000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 0 + 0x51 + + + 0x31 + + + 0x31 + + + 0x31 + + + 0x51 + + + 0x51 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + + 0.920000 + 0.500000 + 0.850000 + 0.075000 + 0.999000 + 1.000000 + 0.975000 + 0.975000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 5 + 0x51 + + + 0x31 + + + 0x31 + + + 0x31 + + + 0x51 + + + 0x51 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + + 0.920000 + 0.850000 + 0.500000 + 0.075000 + 0.999000 + 1.000000 + 0.975000 + 0.975000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 1 + 0x30 + + + 0x10 + + + 0x21 + + + 0x30 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + + 0.720000 + 0.500000 + 0.850000 + 0.050000 + 0.900000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 3 + 0x30 + + + 0x10 + + + 0x21 + + + 0x30 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + 0x50 + + + + 0.830000 + 0.500000 + 0.850000 + 0.075000 + 0.999000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 6 + 0x51 + + + 0x31 + + + 0x31 + + + 0x31 + + + 0x51 + + + 0x51 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + + 1.000000 + 0.500000 + 0.850000 + 0.075000 + 0.999000 + 1.000000 + 0.800000 + 0.800000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 11 + 0x51 + + + 0x31 + + + 0x31 + + + 0x31 + + + 0x51 + + + 0x51 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + + 1.000000 + 1.000000 + 1.000000 + 0.150000 + 0.999000 + 1.000000 + 0.800000 + 0.800000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 12 + 0x51 + + + 0x31 + + + 0x31 + + + 0x31 + + + 0x51 + + + 0x51 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + + 1.000000 + 1.000000 + 1.000000 + 0.150000 + 0.999000 + 1.000000 + 0.800000 + 0.800000 + 1.000000 + 1.000000 + 0.920000 + + + + + + + + + 13 + 0x51 + + + 0x31 + + + 0x31 + + + 0x31 + + + 0x51 + + + 0x51 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + + 1.000000 + 1.000000 + 1.000000 + 0.150000 + 0.999000 + 1.000000 + 0.800000 + 0.800000 + 1.000000 + 1.000000 + 0.920000 + + + + + + + + + 19 + 0x51 + + + 0x31 + + + 0x31 + + + 0x31 + + + 0x51 + + + 0x51 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + + 0.830000 + 1.000000 + 1.000000 + 0.150000 + 0.999000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + 22 + 0x51 + + + 0x31 + + + 0x31 + + + 0x31 + + + 0x51 + + + 0x51 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + 0x70 + + + + 0.830000 + 1.000000 + 1.000000 + 0.150000 + 0.900000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + + + + 0.720000 + 0.500000 + 0.750000 + 0.050000 + 0.900000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + 1.000000 + + + + + + + + diff --git a/src/xml/escp2/model/Makefile.am b/src/xml/escp2/model/Makefile.am index f8780ee..97d744a 100644 --- a/src/xml/escp2/model/Makefile.am +++ b/src/xml/escp2/model/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.13 2008/11/15 00:41:48 rlk Exp $ +## $Id: Makefile.am,v 1.14 2008/12/10 00:44:12 rlk Exp $ ## Copyright (C) 2008 Robert Krawitz ## ## This program is free software; you can redistribute it and/or modify @@ -122,7 +122,8 @@ pkgxmldata_DATA = \ model_93.xml \ model_94.xml \ model_95.xml \ - model_96.xml + model_96.xml \ + model_97.xml xml-stamp: $(pkgxmldata_DATA) Makefile.am -rm -f $@ $@.tmp diff --git a/src/xml/escp2/model/Makefile.in b/src/xml/escp2/model/Makefile.in index 1fb6be9..6070456 100644 --- a/src/xml/escp2/model/Makefile.in +++ b/src/xml/escp2/model/Makefile.in @@ -370,7 +370,8 @@ pkgxmldata_DATA = \ model_93.xml \ model_94.xml \ model_95.xml \ - model_96.xml + model_96.xml \ + model_97.xml CLEANFILES = xmli18n-tmp.h xml-stamp xml-stamp.tmp EXTRA_DIST = $(pkgxmldata_DATA) diff --git a/src/xml/escp2/model/model_87.xml b/src/xml/escp2/model/model_87.xml index ef7b36b..ded92ec 100644 --- a/src/xml/escp2/model/model_87.xml +++ b/src/xml/escp2/model/model_87.xml @@ -57,10 +57,11 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. 144 144 612 86400 612 86400 - 9 9 27 27 - 9 9 27 27 + 9 9 0 0 + 9 9 0 0 9 9 0 0 9 9 0 0 + -32768 -32768 27 27 4 15 0 0 diff --git a/src/xml/escp2/model/model_94.xml b/src/xml/escp2/model/model_94.xml index 7ebaf17..534cfe2 100644 --- a/src/xml/escp2/model/model_94.xml +++ b/src/xml/escp2/model/model_94.xml @@ -28,7 +28,7 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. US\003\000\000\000\002 \000\000\000\033\001@EJL\0401284.4\012@EJL\040\040\040\040\040\012\033@ - SN\001\000\000 + JS\014\000\000GUTENPRINT\000SN\001\000\000 JE\001\000\000 2000 Yes @@ -63,8 +63,8 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. 10 1 80 + -180 42 - 0 1 28800 16588800 @@ -89,83 +89,50 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. 360 120 4.000000 - 17 + 16 360 2 - 0.250000 - 0.500000 + 0.200000 + 0.350000 1.000000 360 360 2.000000 - 17 - 360 - 2 - 0.250000 - 0.500000 - 1.000000 - - - 360 360 - 2 - 2.000000 - 17 - 360 - 2 - 0.250000 - 0.500000 - 1.000000 - - - 720 360 - 1.560000 - 18 + 16 360 2 0.200000 - 0.330000 + 0.350000 1.000000 - + 720 360 - 2 1.560000 - 18 + 17 360 2 - 0.200000 - 0.330000 + 0.300000 + 0.660000 1.000000 720 720 0.780000 - 18 - 360 - 2 - 0.200000 - 0.330000 - 1.000000 - - - 720 720 - 2 - 0.780000 - 18 + 17 360 2 - 0.200000 - 0.330000 + 0.300000 + 0.550000 1.000000 1440 720 - 0.512000 - 19 + 0.778000 + 18 360 2 - 0.250000 + 0.380000 0.500000 1.000000 @@ -173,7 +140,7 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. 2880 1440 1440 1440 0.512000 - 19 + 18 360 2 0.500000 @@ -182,7 +149,7 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. 2880 1440 0.512 - 19 + 18 360 2 1.000000 @@ -190,7 +157,7 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. 5760 1440 0.256000 - 19 + 18 360 2 1.000000 @@ -198,7 +165,7 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. 2880 2880 0.256000 - 19 + 18 360 2 1.000000 @@ -206,7 +173,7 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. 5760 2880 0.128000 - 19 + 18 360 2 1.000000 diff --git a/src/xml/escp2/model/model_96.xml b/src/xml/escp2/model/model_96.xml index 469a82f..dac4c6e 100644 --- a/src/xml/escp2/model/model_96.xml +++ b/src/xml/escp2/model/model_96.xml @@ -22,9 +22,9 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. - + - + US\003\000\000\000\002 \000\000\000\033\001@EJL\0401284.4\012@EJL\040\040\040\040\040\012\033@ @@ -62,9 +62,9 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. 9 9 0 9 9 9 0 0 9 9 0 0 - 204 189 + 9 9 27 27 + 204 184 595 842 - 24 4 15 0 0 @@ -75,75 +75,66 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. - - 360 90 - 4.000000 - 51 - 360 - 2 - 0.125000 - 0.420000 - 1.000000 - 360 180 4.000000 - 51 + 49 360 2 - 0.125000 - 0.420000 + 0.360000 + 0.600000 1.000000 360 360 4.000000 - 51 + 49 360 2 - 0.125000 - 0.420000 + 0.360000 + 0.600000 1.000000 720 360 - 3.520000 - 36 + 4 + 2.450000 + 33 720 2 - 0.125000 - 0.420000 + 0.160000 + 0.580000 1.000000 720 720 - 1.760000 - 36 + 1.224000 + 33 720 2 - 0.125000 - 0.420000 + 0.130000 + 0.580000 1.000000 1440 720 - 0.880000 - 36 + 0.612000 + 33 720 2 - 0.125000 - 0.420000 + 0.130000 + 0.580000 1.000000 2880 1440 1440 1440 - 0.440000 - 36 + 1.1770000 + 37 720 2 - 0.125000 - 0.420000 + 0.500000 + 0.600000 1.000000 @@ -152,8 +143,8 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint. 37 720 2 - 0.338000 - 0.400000 + 0.500000 + 0.600000 1.000000 diff --git a/src/xml/escp2/model/model_97.xml b/src/xml/escp2/model/model_97.xml new file mode 100644 index 0000000..9323c2f --- /dev/null +++ b/src/xml/escp2/model/model_97.xml @@ -0,0 +1,188 @@ + + + + + * Copyright 2008 Robert Krawitz (rlk@alum.mit.edu) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + + + + + + + US\003\000\000\000\002 + \000\000\000\033\001@EJL\0401284.4\012@EJL\040\040\040\040\040\012\033@ + SN\001\000\000 + JE\001\000\000 + 2000 + Yes + + + + + Portrait + + 90 + 1 + 0 + 4 + + 6 + 360 + 14400 + 360 90 + 5760 2880 + 10 + 1 + 80 + 42 + 1 + 28800 + 16588800 + 144 144 + 612 86400 + 612 86400 + 9 9 0 9 + 9 9 0 9 + 9 9 0 0 + 9 9 0 0 + 9 9 27 27 + 204 189 + 595 842 + 4 15 0 0 + + + + + + + + + + + 360 90 + 4.000000 + 51 + 360 + 2 + 0.125000 + 0.420000 + 1.000000 + + + 360 180 + 4.000000 + 49 + 360 + 2 + 0.360000 + 0.600000 + 1.000000 + + + 360 360 + 4.000000 + 49 + 360 + 2 + 0.360000 + 0.600000 + 1.000000 + + + 720 360 + 4 + 2.450000 + 33 + 720 + 2 + 0.160000 + 0.580000 + 1.000000 + + + 720 720 + 1.224000 + 33 + 720 + 2 + 0.130000 + 0.580000 + 1.000000 + + + 1440 720 + 0.612000 + 33 + 720 + 2 + 0.130000 + 0.580000 + 1.000000 + + + 2880 1440 + 1440 1440 + 1.1770000 + 37 + 720 + 2 + 0.500000 + 0.600000 + 1.000000 + + + 2880 1440 + 0.586000 + 37 + 720 + 2 + 0.500000 + 0.600000 + 1.000000 + + + 5760 1440 + 0.733000 + 37 + 720 + 2 + 0.833000 + 1.000000 + + + 2880 2880 + 0.733000 + 37 + 720 + 2 + 0.833000 + 1.000000 + + + 5760 2880 + 0.440000 + 37 + 720 + 2 + 1.000000 + + + + diff --git a/src/xml/printers.xml b/src/xml/printers.xml index f75ce13..d04e97a 100644 --- a/src/xml/printers.xml +++ b/src/xml/printers.xml @@ -1,7 +1,7 @@