Created attachment 394483 [details] /var/log/cups/error_log Description of problem: We're trying to print to various Windows network printer shares which default to A4 paper size. The default papersize for ghostscript is US Letter, though, and there seems no simple way to pass the actual paper size to ghostscript, except modifying gs_init.ps which isn't an option in a future 5-digit workstation environment. The printer was defined with "lpadmin ... -o PaperSize=a4", lpoptions shows "media=A4". What works (where HPLaserJ is a raw port 9100 printer without filtering): 1. gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -sDEVICE=pxlmono -r600x600 -sPAPERSIZE=a4 -sOutputFile=- /usr/share/cups/data/testprint.ps | lpr -P HPLaserJ 2. export GS_OPTIONS="-sPAPERSIZE=a4" gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -sDEVICE=pxlmono -r600x600 -sOutputFile=- /usr/share/cups/data/testprint.ps | lpr -P HPLaserJP 3. Set DEFAULTPAPERSIZE in /usr/share/ghostscript/8.15/lib/gs_init.ps what does not work: 1. lpr /usr/share/cups/data/testprint.ps lpr -o media=A4 /usr/share/cups/data/testprint.ps lpr -o media=a4 /usr/share/cups/data/testprint.ps 2. setting /etc/papersize = a4 The cups error_log shows that the papersize option is not passed to the gs backend, hence gs always uses its default paper size. Although uncommenting the DEFAULTPAPERSIZE option in gs_init.ps works for A4, this is not an option because then the paper size is fixed to A4 and one can't print other sizes e.g. A3. The correct behaviour would be to pass a correct papersize option to gs, either from lpoptions or lpr -o media=a4 or whatever. The same is true if printing from an application like Firefox, OpenOffice, Lotus Symphony, no difference. Version-Release number of selected component (if applicable): cups-1.3.7-11.el5 How reproducible: always Steps to Reproduce: 1. see above 2. 3. Actual results: tries to print US Letter which fails on A4 printers; printer has to be reset or overridden manually. Expected results: should print A4 or whetever size is passed in a printing application Additional info: please see attached cups error log. It clearly shows that the page size is set to A4 in various places but not passed to gs.
Please attach the PPD you are using, /etc/cups/ppd/FS008IC9-HPLaserJ.ppd.
Created attachment 394487 [details] it says DefaultPageSize: A4
Seems to be a ghostscript problem. The filter chain looks like this: testpage -> pstops -> foomatic -> ghostscript By running the chain all the way through to ghostscript, and sending the output through ghostscript-8.70-5.fc12 on Fedora 12 before sending it on to the printer tagged as raw, the job comes out correctly as A4.
Can you also deliberately set other page sizes? Methinks CUPS should invoke gs with the proper -sPAPERSIZE= option. In our case gs even rendered as US Letter where it said A4 in the Postscript file.
The -sPAPERSIZE option is not meant to be required for this driver (pxlmono). The page size is set in the PostScript input file using PostScript commands from the PPD's PageSize/PageRegion options. For this driver, that means: <</PageSize[595 842]/ImagingBBox null>>setpagedevice That PostScript fragment *is* being inserted into the input stream, but for some reason is not functioning correctly for this driver.
If RHEL 5.4 needs an update package to correct this, is there any way to provide ESP Ghostscript 8.15.3 or later? That would also resolve another problem that we have (http://www.linuxfoundation.org/collaborate/workgroups/openprinting/database/driverpackages#Distributions_which_are_only_LSB-3.1_compliant). The one we use is 8.15.2-9.11.el5, and we need to install the Postscript-Lexmark package. Anyway, there is also a service request for this one (1994946). Maybe you can consolidate the work.
8.70-1 for el5, wow. Thanks!
Hi, I don't find ghostscript-8.70-1.el5 in RHN, only -5.el6 ... where should I find it?
Please be patient while the package undergoes internal testing.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Due to an error in the pxlmono driver, an incorrect page size may have been used when attempting to print a document with other size than the default US Letter. With this update, Ghostscript now always retains the correct page size.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -Due to an error in the pxlmono driver, an incorrect page size may have been used when attempting to print a document with other size than the default US Letter. With this update, Ghostscript now always retains the correct page size.+Due to an error in the pxlmono driver, an incorrect page size may have been used when attempting to print a document with a size other than the default US Letter. With this update, Ghostscript now always retains the correct page size.
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-2011-0137.html