Bug 541604 - gdevcups Y axis sometimes wrong
Summary: gdevcups Y axis sometimes wrong
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ghostscript
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 544241 579743 581147 (view as bug list)
Depends On: 563313
Blocks: 533462 557458
TreeView+ depends on / blocked
 
Reported: 2009-11-26 13:01 UTC by Tim Waugh
Modified: 2011-05-13 10:25 UTC (History)
6 users (show)

Fixed In Version: ghostscript-8.71-6.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 557458 (view as bug list)
Environment:
Last Closed: 2010-04-13 01:55:51 UTC
Type: ---


Attachments (Terms of Use)
PPD for demonstrating the problem (22.16 KB, application/vnd.cups-ppd)
2009-12-10 16:37 UTC, Tim Waugh
no flags Details
PDF input file for demonstrating the problem (8.99 KB, application/octet-stream)
2009-12-10 16:40 UTC, Tim Waugh
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Ghostscript 691029 0 None None None Never
Launchpad 484928 0 None None None Never

Description Tim Waugh 2009-11-26 13:01:47 UTC
Description of problem:
All reverse sides of a duplex print are horizontally flipped.

Version-Release number of selected component (if applicable):
hplip-3.9.8-22.fc11

How reproducible:
100%

Steps to Reproduce:
1.Print something in duplex.

Comment 1 Fedora Update System 2009-11-26 15:45:28 UTC
hplip-3.9.8-21.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/hplip-3.9.8-21.fc11

Comment 2 Fedora Update System 2009-11-26 15:46:35 UTC
hplip-3.9.8-24.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/hplip-3.9.8-24.fc12

Comment 3 Fedora Update System 2009-11-27 21:42:47 UTC
hplip-3.9.8-21.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update hplip'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-12227

Comment 4 Fedora Update System 2009-11-27 21:51:19 UTC
hplip-3.9.8-24.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update hplip'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-12253

Comment 5 Andrew McNabb 2009-12-07 16:07:22 UTC
Is this different than choosing the "long-side" vs. "short-side" duplex options?  How exactly is it flipped?  I'm just curious because I haven't noticed any problems yet (but I've only recently started doing duplex printing in F12, so I may have just missed it).

Comment 6 Tim Waugh 2009-12-07 17:07:22 UTC
Writing was in mirror-image when printing portrait documents duplex.

Comment 7 Tim Waugh 2009-12-10 16:15:48 UTC
*** Bug 544241 has been marked as a duplicate of this bug. ***

Comment 8 Tim Waugh 2009-12-10 16:24:20 UTC
I think the problem is in the pstoraster filter, specifically in the
ghostscript 'cups' output driver.

The original problem was bug #533462.  I discovered that the reason is the hpcups PPD using 'PageSetup' for the /Duplex setting -- this makes the resulting PS document not DSC-compliant, and any setpagedevice commands in the PageSetup section are lost when using number-up=2.

So I am now trying with 'AnySetup' for the /Duplex setting.  But that has uncovered another problem, described below.

The new problem is that with a 2-page portrait PDF document with
Duplex=DuplexNoTumble, printed with an hpcups PPD modified as described above,
the ghostscript 'cups' driver is not properly rotating the reverse sides.

Visually, this is the input document:

+-----+  +-----+
|  /->|  |  /->|
| /   |  | /   |
|/    |  |/    |
+-----+  +-----+

This is what I expect in the raster output:

+-----+  +-----+
|  /->|  |    /|
| /   |  |   / |
|/    |  |<-/  |
+-----+  +-----+

But this is what I get:

+-----+  +-----+
|  /->|  |<-\  |
| /   |  |   \ |
|/    |  |    \|
+-----+  +-----+

The problem is that the Y axis is not being flipped for the reverse side.  The
X axis is flipped when the page is written out, but the Y axis is meant to be
flipped during rendering, by use of the device matrix.

Comment 9 Tim Waugh 2009-12-10 16:37:23 UTC
Created attachment 377515 [details]
PPD for demonstrating the problem

Comment 10 Tim Waugh 2009-12-10 16:40:24 UTC
Created attachment 377517 [details]
PDF input file for demonstrating the problem

This file, together with the PPD, can demonstrate the problem.

export PPD=hpcups.ppd
/usr/lib/cups/filter/pdftops 1 me '' 1 Duplex=DuplexNoTumble \
  <frontback.pdf >pdftops.ps
/usr/lib/cups/filter/pstoraster 1 me '' 1 Duplex=DuplexNoTumble \
  <pdftops.ps >pstoraster.rast
gdb --args /usr/lib/cups/filter/hpcups 1 me '' 1 Duplex=DuplexNoTumble \
  pstoraster.rast
(gdb) b 'HPCups::setLogLevel'
(gdb) r
(gdb) set m_iLogLevel=4
(gdb) continue
(gdb) quit
eog /tmp/hpcups*2*.bmp

Comment 11 Tim Waugh 2009-12-10 16:42:02 UTC
(The weird gdb invocation above is just to see a BMP representation of the raster output of pstoraster -- when it's loglevel is 4 it writes it to /tmp files.  It reads the hpLogLevel line in /etc/cups/cupsd.conf if it is allowed to, so if running as root you don't need gdb; just add 'hpLogLevel 4' to cupsd.conf.)

Comment 12 Fedora Update System 2010-01-21 13:49:34 UTC
ghostscript-8.70-3.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/ghostscript-8.70-3.fc12

Comment 13 Fedora Update System 2010-01-22 22:33:06 UTC
ghostscript-8.70-3.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ghostscript'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0892

Comment 14 Fedora Update System 2010-01-26 01:06:22 UTC
ghostscript-8.70-5.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ghostscript'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-0892

Comment 15 Fedora Update System 2010-02-09 04:58:29 UTC
ghostscript-8.70-5.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Tim Waugh 2010-02-16 12:34:36 UTC
Re-opening.  ghostscript-8.70-6.fc12 reverts these changes due to a regression (bug #563313).

Comment 17 Fedora Update System 2010-03-16 15:38:46 UTC
ghostscript-8.71-6.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/ghostscript-8.71-6.fc11

Comment 18 Fedora Update System 2010-03-16 15:39:58 UTC
ghostscript-8.71-6.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/ghostscript-8.71-6.fc12

Comment 19 Fedora Update System 2010-03-16 15:41:30 UTC
ghostscript-8.71-9.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/ghostscript-8.71-9.fc13

Comment 20 Fedora Update System 2010-03-18 03:18:16 UTC
ghostscript-8.71-6.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ghostscript'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/ghostscript-8.71-6.fc12

Comment 21 Fedora Update System 2010-03-18 03:31:10 UTC
ghostscript-8.71-6.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ghostscript'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/ghostscript-8.71-6.fc11

Comment 22 Fedora Update System 2010-03-24 23:39:41 UTC
ghostscript-8.71-9.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Tim Waugh 2010-04-08 08:38:24 UTC
*** Bug 579743 has been marked as a duplicate of this bug. ***

Comment 24 Stephen Haffly 2010-04-10 17:59:04 UTC
*** Bug 581147 has been marked as a duplicate of this bug. ***

Comment 25 Fedora Update System 2010-04-13 01:55:30 UTC
ghostscript-8.71-6.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 26 Fedora Update System 2010-04-20 13:28:17 UTC
ghostscript-8.71-6.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 27 Uli Vogl 2011-04-30 14:41:43 UTC
It seems this fix causes new problems concerning other printer drivers.
I've been using KONIKAMINOLTA magicolor 2430DL for 5 years without any problem, but since this fix, duplex printing doesn't work properly:

Each 2nd side (backside) is now vertically mirror-inverted. 
(This is exactly the same problem reported above (hp-driver) before the fix, but now AFTER the fix)

previous ghostscript versions, e.g. 8.62_17, are working fine!

Is it possible, that this fix consists in a simple change of delivering 
the 2nd duplex side vertically mirrored to the vendord river "rastertokm2430dl"?

When yes, is there a chance to configure it to follow the old way (before ghostscript-8.71-6.fc11)?

Thanks a lot
Uli

Comment 28 Tim Waugh 2011-05-13 10:25:15 UTC
Uli: which version of Fedora/ghostscript are you using currently?

I suspect that the 'rastertokm2430dl' filter is working around the bug that we've fixed, and that KM need to fix their filter not to do this any more.  Another possibility is that their PPD has an incorrect 'cupsBackSide' attribute value.


Note You need to log in before you can comment on or make changes to this bug.