GNOME Bugzilla – Bug 353681
Postscript printing work in portrait/portrait mode only, PDF output OK
Last modified: 2006-10-12 15:58:20 UTC
Please describe the problem: Postscript-output printing only works if the gthumb > Print > Paper Details > Orientation (call this setting "A") = Portrait AND the per-printer setup gui has Print > Paper > Page orientation (call this setting "B") = Portrait. if A = portrait, B = portrait, output = OK if A = portrait, B = upside-down portrait, output = blank if A = landscape, B = landscape, output = blank if A = landscape, B = upside-down landscape, output = blank This is true for "Generic Postscript" output (saving to a file, and viewing with Evince), or printing to a (physical) CUPS printer. It is true for images that have X>Y and Y>X. However, it DOES work in all modes if you use the "Create a PDF document" printer and save to a PDF file (viewed with Evince). I believe that something is wrong with the postscript bounding box settings. Steps to reproduce: 1. File > Print 2. Paper Details > Orientation = Landscape 3. Select "Generic Postscript", Location=File, Save As = output.ps 4. Paper > Page orientation = Landscape 5. View output.ps. It is blank. 6. Repeat above, replacing "Landscape" with "Portrait" in steps 2 and 4. 7. View output.ps. It is OK. Actual results: See above. Expected results: See above. Does this happen every time? Yes. Other information:
I should mention that the default margins and US Letter sizing were used for all tests.
I cannot reproduce this bug. Suggestion: instead of using output.ps try to select an output file pressing the "save as" button, it's not clear to me where the output.ps is saved without using "save as".
Well, output.ps goes to your home directory by default. However, using another filename (~/output2.ps) doesn't change the results. I'm using FC5. Another colleague is having the same problem... I'll post some sample generated files tomorrow.
Please see http://www.avtechpulse.com/downloads/samples.zip. One file, portrait-portrait.ps, is an example of a correctly-printed portrait postscript output. The other file, landscape-landscape.ps, is the same image printed landscape/landscape. It is all blank (viewed with evince), although the file size is approx the same. - Mike
The bounding boxes seem foobar in landscape modes. In landscape/landscape, the transformation matrix [621.921 0 0 466.441 85.0394 -4517.22]cm the -4517 is very strange... Looking at portrait/portrait, I put in similar numbers into landscape/landscape -- [621.921 0 0 466.441 85.0394 72.7795]cm and the image rotated 180 degrees. I then ran 2.6.x (which was fine) and saw its tranformation matrix: [0 621.921 -466.441 0 524.82 85.0394]cm and the image was rotates to lanscape orientation (the paper was portrait, which seems to make sense). What's interesting is pdf works, but postscript does not. Marty
Created attachment 73136 [details] [review] Patch to fix postscript printing by removing incorrect scaling factors. This block code appears in two places: gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_PAPER_WIDTH, width, unit); gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_PAPER_HEIGHT, height, unit); gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_LAYOUT_WIDTH, width, unit); gnome_print_config_set_length (data->pci->config, UCHAR GNOME_PRINT_KEY_LAYOUT_HEIGHT, height, unit); The "LAYOUT" and "PAPER" width and height are set to the same values. This is wrong. The last two lines should be removed. The "LAYOUT" parameters are multiplication (scaling) factors, not absolute measurements. (The "PAPER" parameters are absolute.) In libgnomeprint/data/globals.xml, GNOME_PRINT_KEY_LAYOUT_WIDTH and GNOME_PRINT_KEY_LAYOUT_HEIGHT default to 1. Patch attached. Please review/commit!
Fixed in CVS head (2.9.0 and later).