gstoraster: Ghostscript runs to long while converting djvu files to Xerox`s 3210 format
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cups-filters (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
My OS:
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Package version: cups-filters version 1.27.4-1
When I try to print djvu files on my Xerox WorkCentre 3210 gstoraster filter, which calls ghostscript inside runs to long while converting djvu files to Xerox`s 3210 format.
E.x.: For 155 pages of djvu files, it runs more then 15 minutes.
I found a solution by adding -dDEVICEWIDTHPOINTS -dDEVICEHEIGHTP
I`ve made patch which solves this problem.
--- a/filter/
+++ b/filter/
@@ -733,8 +733,17 @@
char output[31] = "";
int pagecount;
size_t bytes;
- snprintf(gscommand, 65536, "%s -q -dNOPAUSE -dBATCH -sDEVICE=bbox %s 2>&1 | grep -c HiResBoundingBox",
- CUPS_GHOSTSCRIPT, filename);
+ // Ghostscript runs to long while converting djvu files to Xerox`s 3210 format
+ // Using -dDEVICEWIDTHPOINTS -dDEVICEHEIGHTP
+ if (ppd) {
+ cupsRasterInter
+ snprintf(gscommand, 65536, "%s -q -dNOPAUSE -dBATCH -dDEVICEWIDTHPO
+ CUPS_GHOSTSCRIPT, h.PageSize[0], h.PageSize[1], filename);
+ }
+ else {
+ snprintf(gscommand, 65536, "%s -q -dNOPAUSE -dBATCH -sDEVICE=bbox %s 2>&1 | grep -c HiResBoundingBox",
+ CUPS_GHOSTSCRIPT, filename);
+ }
FILE *pd = popen(gscommand, "r");
if (!pd) {
Status changed to 'Confirmed' because the bug affects multiple users.