Bug 689327

Summary: Wrong page size with laserjet.ppd
Product: Ghostscript Reporter: Till Kamppeter <till.kamppeter>
Component: CUPS driverAssignee: Michael Sweet <mike>
Status: NOTIFIED WORKSFORME    
Severity: normal CC: mike
Priority: P4    
Version: master   
Hardware: All   
OS: All   
URL: http://www.cups.org/str.php?L1794
Customer: Word Size: ---
Bug Depends on:    
Bug Blocks: 689315    
Attachments: Offending PS file
Fixes media size setting

Description Till Kamppeter 2007-07-04 08:54:51 UTC
See

http://www.cups.org/str.php?L1794

-------------------------------------------------------------------------------
Not sure where exactly the problem is here, but the printer asks for Letter
paper when an A4 job was sent.  It's not a hardware configuration issue: I can
see in the error_log that Letter page size is sent.

Original bug report:
  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=191601

The problem comes when using the laserjet.ppd.gz PPD that ships with CUPS,
although the problem might be in pstoraster or somewhere else.
-------------------------------------------------------------------------------

Patch and offending PS file attached.
Comment 1 Till Kamppeter 2007-07-04 08:56:23 UTC
Created attachment 3151 [details]
Offending PS file
Comment 2 Till Kamppeter 2007-07-04 08:58:05 UTC
Created attachment 3152 [details]
Fixes media size setting
Comment 3 Ray Johnston 2007-07-10 09:53:05 UTC
Ghostscript _can_ do correct media matching _IF_ the InputAttributes 
dictionary is populated correctly by the device driver. See the src/gdevclj.c 
for an example of this. 
 
Disabling the media matching (as the patch does) is NOT acceptable. 
 
The 'cups' device should set the InputAttributes dictionary using its 
knowledge of the actual printer page sizes. 
 
Alternatively, the client (CUPS) can set the Policy for PageSize to 7 before 
sending a job. 
 
Comment 4 Ray Johnston 2007-07-10 09:54:55 UTC
This bug will be closed as INVALID once a corresponding bug is open 
against CUPS 
Comment 5 Ray Johnston 2007-07-10 10:04:58 UTC
The only external in gdevdcrd.c is sample_device_crd_get_params  
which is only used in these modules:  
src/gdevbit.c  
src/gdevdcrd.c  
src/gdevdcrd.h  
src/gdevdevn.c  
src/gdevrinkj.c  
src/gdevxcf.c  
  
All of these devices _should_ include the gdevdcrd.$(OBJ) in the  
dependency list  
  
The psd device has gdevcrd.h, but we don't know why (as well as some  
other modules that include it as well).  
  
  
Comment 6 Ray Johnston 2007-07-10 10:06:00 UTC
Comment #5 is for another bug (OOPS) 
Comment 7 Ray Johnston 2007-10-11 18:45:55 UTC
Since CUPS (ESP) Ghostscript custom modifications have now been integrated
to Artifex/GPL Ghostscript, I am closing this issue.

If the problem persists, please re-open or submit a new bug.