Activity log for bug #126139

Date Who What changed Old value New value Message
2007-07-15 13:12:39 DurvalMenezes bug added bug
2007-07-15 13:21:27 DurvalMenezes bug assigned to foo2zjs (upstream)
2007-07-15 13:23:57 DurvalMenezes description Version information: Ubuntu 7.04 Feisty with all updates applied CUPS 1.2.8 (Ubuntu package cupsys 1.2.8-0ubuntu8) Printer: HP Laserjet 1018 connected directly to an USB 2.0 port Problem description: The "jobs" pages on CUPS admin always show "Unknown" for the number of pages printed; moreover, I checked /var/log/cups/page_log and it was empty. Investigation and solution: After some investigation, I found that CUPS depends on 'PAGE: n c' lines being output to stderr by pstops or one of the filters that are called for each page printed. Also, I found that when there's a PPD file configured for the printer, and that PPD defines at least 1 filter for it (as is the case with the.PPD files included with the foo2zjs package), the pstops program does NOT output the 'PAGE: n c' lines, and so the CUPS page accounting can't register the number of pages being printed. I checked the source for other filters (e.g, rastertohp) and found that they indeed do output the required 'PAGE: n c' lines. From the above, I concluded that the problem is caused by foo2zjs not outputting the 'PAGE: n c' lines to stderr, so I made the following patch to the current Ubuntu package sources (foo2zjs_20061224-0ubuntu3): =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ --- foo2zjs.c.orig-20070715 2006-12-07 11:24:31.000000000 -0200 +++ foo2zjs.c 2007-07-15 07:17:04.000000000 -0300 @@ -482,6 +482,9 @@ if (current->len != 20 ) error(1,"wrong BIH length\n"); + /* output the necessary line for CUPS page accounting to work */ + fprintf(stderr, "PAGE: %d %d\n", ++pageno, Copies); + /* startpage, jbig_bih, jbig_bid, jbig_end, endpage */ w = (((long) current->data[ 4] << 24) | ((long) current->data[ 5] << 16) @@ -528,7 +531,7 @@ if ((PageNum & 1) == 0 && EvenPages) SeekMedia = ftell(EvenPages) - 4; if (Model == MODEL_2300DL) - item_uint32_write(ZJI_MINOLTA_PAGE_NUMBER, ++pageno, ofp); + item_uint32_write(ZJI_MINOLTA_PAGE_NUMBER, pageno, ofp); } void =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-] I've tested it and now page accounting works perfectly, with no ill side-effects (at least none that I can detect). I've also posted the above fix upstream (updated to the last upstream version), both to foo2zjs community forum at http://foo2zjs.rkkda.com/forum/read.php?8,488 and directly to its author. ==Eof== Version information: Ubuntu 7.04 Feisty with all updates applied CUPS 1.2.8 (Ubuntu package cupsys 1.2.8-0ubuntu8) Printer: HP Laserjet 1018 connected directly to an USB 2.0 port Problem description: The "jobs" pages on CUPS admin always show "Unknown" for the number of pages printed; moreover, I checked /var/log/cups/page_log and it was empty. Investigation and solution: After some investigation, I found that CUPS depends on 'PAGE: n c' lines being output to stderr by pstops or one of the filters that are called for each page printed. Also, I found that when there's a PPD file configured for the printer, and that PPD defines at least 1 filter for it (as is the case with the.PPD files included with the foo2zjs package), the pstops program does NOT output the 'PAGE: n c' lines, and so the CUPS page accounting can't register the number of pages being printed. I checked the source for other filters (e.g, rastertohp) and found that they indeed do output the required 'PAGE: n c' lines. From the above, I concluded that the problem is caused by foo2zjs not outputting the 'PAGE: n c' lines to stderr, so I made the following patch to the current Ubuntu package sources (foo2zjs_20061224-0ubuntu3): =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ --- foo2zjs.c.orig-20070715 2006-12-07 11:24:31.000000000 -0200 +++ foo2zjs.c 2007-07-15 07:17:04.000000000 -0300 @@ -482,6 +482,9 @@ if (current->len != 20 ) error(1,"wrong BIH length\n"); + /* output the necessary line for CUPS page accounting to work */ + fprintf(stderr, "PAGE: %d %d\n", ++pageno, Copies); + /* startpage, jbig_bih, jbig_bid, jbig_end, endpage */ w = (((long) current->data[ 4] << 24) | ((long) current->data[ 5] << 16) @@ -528,7 +531,7 @@ if ((PageNum & 1) == 0 && EvenPages) SeekMedia = ftell(EvenPages) - 4; if (Model == MODEL_2300DL) - item_uint32_write(ZJI_MINOLTA_PAGE_NUMBER, ++pageno, ofp); + item_uint32_write(ZJI_MINOLTA_PAGE_NUMBER, pageno, ofp); } void =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-] (I've also added that patch below, as an attachment). I've tested it and now page accounting works perfectly, with no ill side-effects (at least none that I can detect). I've also posted the above fix upstream (updated to the last upstream version), both to foo2zjs community forum at http://foo2zjs.rkkda.com/forum/read.php?8,488 and directly to its author. ==Eof==
2007-07-15 13:26:26 DurvalMenezes bug added attachment 'foo2zjs-20061224_-_CUPS_page_accounting_not_working.patch' (patch for the foo2zjs CUPS accounting problem)
2007-07-15 13:26:57 DurvalMenezes description Version information: Ubuntu 7.04 Feisty with all updates applied CUPS 1.2.8 (Ubuntu package cupsys 1.2.8-0ubuntu8) Printer: HP Laserjet 1018 connected directly to an USB 2.0 port Problem description: The "jobs" pages on CUPS admin always show "Unknown" for the number of pages printed; moreover, I checked /var/log/cups/page_log and it was empty. Investigation and solution: After some investigation, I found that CUPS depends on 'PAGE: n c' lines being output to stderr by pstops or one of the filters that are called for each page printed. Also, I found that when there's a PPD file configured for the printer, and that PPD defines at least 1 filter for it (as is the case with the.PPD files included with the foo2zjs package), the pstops program does NOT output the 'PAGE: n c' lines, and so the CUPS page accounting can't register the number of pages being printed. I checked the source for other filters (e.g, rastertohp) and found that they indeed do output the required 'PAGE: n c' lines. From the above, I concluded that the problem is caused by foo2zjs not outputting the 'PAGE: n c' lines to stderr, so I made the following patch to the current Ubuntu package sources (foo2zjs_20061224-0ubuntu3): =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ --- foo2zjs.c.orig-20070715 2006-12-07 11:24:31.000000000 -0200 +++ foo2zjs.c 2007-07-15 07:17:04.000000000 -0300 @@ -482,6 +482,9 @@ if (current->len != 20 ) error(1,"wrong BIH length\n"); + /* output the necessary line for CUPS page accounting to work */ + fprintf(stderr, "PAGE: %d %d\n", ++pageno, Copies); + /* startpage, jbig_bih, jbig_bid, jbig_end, endpage */ w = (((long) current->data[ 4] << 24) | ((long) current->data[ 5] << 16) @@ -528,7 +531,7 @@ if ((PageNum & 1) == 0 && EvenPages) SeekMedia = ftell(EvenPages) - 4; if (Model == MODEL_2300DL) - item_uint32_write(ZJI_MINOLTA_PAGE_NUMBER, ++pageno, ofp); + item_uint32_write(ZJI_MINOLTA_PAGE_NUMBER, pageno, ofp); } void =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-] (I've also added that patch below, as an attachment). I've tested it and now page accounting works perfectly, with no ill side-effects (at least none that I can detect). I've also posted the above fix upstream (updated to the last upstream version), both to foo2zjs community forum at http://foo2zjs.rkkda.com/forum/read.php?8,488 and directly to its author. ==Eof== Version information: Ubuntu 7.04 Feisty with all updates applied CUPS 1.2.8 (Ubuntu package cupsys 1.2.8-0ubuntu8) Printer: HP Laserjet 1018 connected directly to an USB 2.0 port Problem description: The "jobs" pages on CUPS admin always show "Unknown" for the number of pages printed; moreover, I checked /var/log/cups/page_log and it was empty.
2007-07-18 10:25:50 Till Kamppeter foo2zjs: status New Incomplete
2007-07-18 10:25:50 Till Kamppeter foo2zjs: statusexplanation
2007-07-18 10:26:19 Till Kamppeter foo2zjs: status New Incomplete
2007-07-18 10:29:49 Till Kamppeter bug assigned to foomatic-filters (Ubuntu)
2007-07-18 10:30:21 Till Kamppeter foomatic-filters: status New Incomplete
2007-07-18 10:30:21 Till Kamppeter foomatic-filters: statusexplanation
2007-07-18 10:30:52 Till Kamppeter bug assigned to foomatic-filters (upstream)
2007-07-18 10:31:13 Till Kamppeter foomatic-filters: status New Incomplete
2007-07-18 17:32:24 Till Kamppeter foomatic-filters: status Incomplete Fix Released
2007-07-18 17:32:59 Till Kamppeter bug assigned to foomatic-db-engine (upstream)
2007-07-18 17:33:16 Till Kamppeter foomatic-db-engine: status New Fix Released
2007-07-18 17:33:45 Till Kamppeter bug assigned to foomatic-db (upstream)
2007-07-18 17:34:02 Till Kamppeter foomatic-db: status New Fix Released
2007-07-18 17:34:17 Till Kamppeter foo2zjs: status Incomplete Invalid
2007-07-18 17:34:35 Till Kamppeter foo2zjs: status Incomplete Invalid
2007-07-18 17:34:49 Till Kamppeter foomatic-filters: status Incomplete In Progress
2007-07-18 17:35:16 Till Kamppeter bug assigned to foomatic-db-engine (Ubuntu)
2007-07-18 17:35:33 Till Kamppeter foomatic-db-engine: status New In Progress
2007-07-18 17:35:33 Till Kamppeter foomatic-db-engine: statusexplanation
2007-07-18 17:35:53 Till Kamppeter bug assigned to foomatic-db (Ubuntu)
2007-07-18 17:36:06 Till Kamppeter foomatic-db: status New In Progress
2007-07-18 17:36:06 Till Kamppeter foomatic-db: statusexplanation
2007-07-18 17:42:56 Till Kamppeter foo2zjs: status Invalid Incomplete
2007-07-18 17:43:13 Till Kamppeter foo2zjs: status Invalid Incomplete
2007-07-19 22:43:45 Till Kamppeter foomatic-db: status In Progress Fix Committed
2007-07-19 22:44:00 Till Kamppeter foomatic-db-engine: status In Progress Fix Committed
2007-07-19 22:44:17 Till Kamppeter foomatic-filters: status In Progress Fix Committed
2007-07-20 10:56:00 Till Kamppeter foomatic-db: status Fix Committed Fix Released
2007-07-20 10:56:17 Till Kamppeter foomatic-db-engine: status Fix Committed Fix Released
2007-07-20 10:57:03 Till Kamppeter foomatic-filters: status Fix Committed Fix Released
2007-07-23 10:34:19 Till Kamppeter foo2zjs: status Incomplete Invalid
2007-07-23 10:34:36 Till Kamppeter foo2zjs: status Incomplete Invalid