Bug 480978

Summary: A3 pagesize pointsize definition wrong in gdevpsu.c
Product: Red Hat Enterprise Linux 5 Reporter: Roland Friedwagner <roland.friedwagner>
Component: ghostscriptAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: QE Internationalization Bugs <qe-i18n-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.0CC: llim, pknirsch, roland.friedwagner
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 09:12:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roland Friedwagner 2009-01-21 15:39:57 UTC
Description of problem:
We running into this problem printing postscript pages on
A3 Paper size after upgradeing from ghostscript V7 to V8.

A3 Pages are only of size letter on A3 paper sheets printed on
Xerox Workcentre Pro 245.


Version-Release number of selected component (if applicable): 
ghostscript-8.15.2-9.1.el5_1.1
ghostscript-7.07-33.2.el4_6.1
all redhat ghostscript versions > 7.07-29
and upstream espgs versions since
r181 | mike | 2006-08-26 02:56:47 +0200 (Sat, 26 Aug 2006)


Steps to Reproduce:
1. echo hallo > hallo.txt
2. a2ps -M a5 -o hallo.ps hallo.txt
3. gs -q -sDEVICE=pswrite -sOutputFile=- -dNOPAUSE -dBATCH -sPAPERSIZE=a3 hallo.ps > hallo_test.ps
4. grep " setpagesize" hallo_test.ps
   is actual: 
   should be: 842 1191 /a3 setpagesize
              or
              842 1191 null setpagesize
  
Actual results:
842 1191 /letter setpagesize

Expected results:
842 1191 /a3 setpagesize


Additional info:
Result "842 1191 null setpagesize" is also ok.
But "/letter" is wrong.

Fix Patch for A3 point size:
--- 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},

To get rid of /letter default size string remove 
Patch6: ghostscript-pagesize.patch in ghostscript.spec

Kind Regards,
Roland

Comment 1 Tim Waugh 2009-01-22 11:57:52 UTC
The ghostscript-pagesize patch was added for bug #126446.  Some printers apparently eat jobs that have '... null setpagesize' (!).

The 842x1191 point size is also seen in lib/gs_statd.ps so I think the gdevpsu.c patch to adjust 1190 to 1191 should be applied.  Thanks.

Comment 5 errata-xmlrpc 2009-09-02 09:12:08 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1257.html