[cups.bugs] [LOW] STR #3064: espgs: A3 pagesize pointsize definition wrong in gdevpsu.c:psw_write_page_header()

Roland Friedwagner roland.friedwagner at wu-wien.ac.at
Tue Jan 20 11:01:06 PST 2009


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Dear espgs Maintainer,

we running into this problem printing postscript pages on 
A3 Paper size after upgradeing from ghostscript V7 to V8
(Pages are only of size letter on A3 paper).


First Reason: 
-------------

A3 point size definition ist wrong in gdevpsu.c (1190 instead of 1191)
Fix Patch:
Index: src/gdevpsu.c
===================================================================
--- src/gdevpsu.c       (revision 204)
+++ src/gdevpsu.c       (working copy)
@@ -289,7 +289,7 @@
        } page_size;
        static const page_size sizes[] = {
            {"/11x17", 792, 1224},
-           {"/a3", 842, 1190},
+           {"/a3", 842, 1191},
            {"/a4", 595, 842},
            {"/b5", 501, 709},
            {"/ledger", 1224, 792},

Second Reason:
--------------

The wrong pagesize definition was there since creation of gdevpsu.c
but it has no impact (in V7) since Revision 181:
Index: src/gdevpsu.c
===================================================================
--- src/gdevpsu.c       (revision 180)
+++ src/gdevpsu.c       (revision 181)
@@ -302,6 +302,8 @@
        while (p->size_name[0] == '/' &&
               (p->width != width || p->height != height))
            ++p;
+       /* If no match then decrement pointer back to /letter */
+       if (p->width == 0 && p->height == 0) --p;
        pprintd2(s, "%d %d ", width, height);
        pprints1(s, "%s setpagesize\n", p->size_name);
     }

Before this patch the pagesize string was "null"
and correct pagesize was derived from pointsize.

Example diff from generated postscript files:
  -842 1191 null setpagesize
  +842 1191 /letter setpagesize

This has the effect that letter sized pages where printed on a3 paper
(at least on Xerox Workcentre Pro 245 printers).


Suggestions:
------------

 - Update a3 pointsize definition in gdevpsu.c

 - Remove 
   r181 | mike | 2006-08-26 02:56:47 +0200 (Sat, 26 Aug 2006) | 2 lines 
   Update

Kind Regards,
Roland

Link: http://www.cups.org/str.php?L3064
Version: Web Site





More information about the cups-devel mailing list