Bug 689327 - Wrong page size with laserjet.ppd
Summary: Wrong page size with laserjet.ppd
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: CUPS driver (show other bugs)
Version: master
Hardware: All All
: P4 normal
Assignee: Michael Sweet
URL: http://www.cups.org/str.php?L1794
Depends on:
Blocks: 689315
  Show dependency tree
Reported: 2007-07-04 08:54 UTC by Till Kamppeter
Modified: 2008-12-19 08:31 UTC (History)
1 user (show)

See Also:
Word Size: ---

Offending PS file (157.65 KB, application/postscript)
2007-07-04 08:56 UTC, Till Kamppeter
Fixes media size setting (6.07 KB, patch)
2007-07-04 08:58 UTC, Till Kamppeter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Till Kamppeter 2007-07-04 08:54:51 UTC


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:

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:  
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.