Bug 1031203 - Cannot print in horizontal
Cannot print in horizontal
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: okular (Show other bugs)
19
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Kevin Kofler
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-15 16:45 EST by Germano Massullo
Modified: 2015-02-17 14:15 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-17 14:15:39 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
document that triggers the problem (162.07 KB, application/x-7z-compressed)
2013-11-15 16:45 EST, Germano Massullo
no flags Details
files from /var/spool/cups/ (75.97 KB, application/x-7z-compressed)
2013-11-29 12:57 EST, Germano Massullo
no flags Details

  None (edit)
Description Germano Massullo 2013-11-15 16:45:06 EST
Created attachment 824718 [details]
document that triggers the problem

Description of problem:
I am trying to print in horizontal format, the pages of the attached document. Everytime the printer prints vertical pages.
I tried with Evince, and it correctly prints in horizontal mode, so it is not a problem of CUPS and/or Poppler engine.
What can it be?

Version-Release number of selected component (if applicable):
okular 4.11.3-1
Comment 1 Kevin Kofler 2013-11-29 11:20:41 EST
Looks like the old landscape printing bug is back… :-(

I think there have been some changes recently in how CUPS handles the landscape vs. portrait options on the lpr command line, it used to be that "landscape" always meant to rotate the input, now I think it tries being smarter and outsmarts Okular. I'm having a look at this.
Comment 2 Kevin Kofler 2013-11-29 11:36:00 EST
See also bug #768811 and http://pkgs.fedoraproject.org/cgit/cups-filters.git/tree/cups-filters-pdf-landscape.patch?h=f19

Adding the CUPS maintainer to CC for a comment.
Comment 3 Kevin Kofler 2013-11-29 11:38:46 EST
And for "the old landscape printing bug" (in Okular) I was referring to, see:
https://bugs.kde.org/show_bug.cgi?id=181290
https://bugzilla.redhat.com/show_bug.cgi?id=509645
Comment 4 Germano Massullo 2013-11-29 11:59:01 EST
Thank you Kevin
Comment 5 Tim Waugh 2013-11-29 12:08:55 EST
Could you please confirm the versions of cups and cups-filters you have?

rpm -q cups cups-filters

The PDF workflow is relatively new and there are still orientation-related bugs remaining even after having fixed bug #768811, for example this one:
https://bugs.launchpad.net/ubuntu/+source/cups-filters/+bug/1243484

To analyse this particular problem with okular, it would be useful to be able to capture the document that okular submitted for printing, as well as information about how it submitted it.

To do this, enable job file preservation like this (as root):

cupsctl PreserveJobFiles=Yes

Print the document again. Now you need to find the two files from /var/spool/cups that correspond to that print job. To find out which ones they are, run these commands:

ls -1 /var/spool/cups/c* | sort | tail -n1
ls -1 /var/spool/cups/d* | sort | tail -n1

Please attach those two files to this bug report.

(Now you can turn off job file preservation with 'cupsctl PreserveJobFiles=No')
Comment 6 Germano Massullo 2013-11-29 12:56:35 EST
(In reply to Tim Waugh from comment #5)
> Could you please confirm the versions of cups and cups-filters you have?
> 
> rpm -q cups cups-filters
cups-1.6.4-2.fc19.x86_64
cups-filters-1.0.40-4.fc19.x86_64
Comment 7 Germano Massullo 2013-11-29 12:57:20 EST
Created attachment 830741 [details]
files from /var/spool/cups/

Done in landscape mode
Comment 8 Tim Waugh 2013-11-29 13:31:40 EST
So it looks like Okular is submitting a job in portrait format, containing the landscape format pages inside each portrait page. Like this, where XXXXX is the actual presentation:

+-----------+
|           |
|           |
|  +-----+  |
|  |XXXXX|  |
|  +-----+  |
|           |
|           |
+-----------+

I guess that's not what you want, so it looks like an Okular bug to me.
Comment 9 Kevin Kofler 2013-11-30 18:30:26 EST
How Okular prints PDF files is that it has Poppler output PostScript for the selected pages, then this module:
https://projects.kde.org/projects/kde/kdegraphics/okular/repository/entry/core/fileprinter.cpp?rev=KDE%2F4.11
starts lpr on the resulting PostScript.

The orientation part is this:
https://projects.kde.org/projects/kde/kdegraphics/okular/repository/entry/core/fileprinter.cpp?rev=KDE%2F4.11#L598

In the past, CUPS interpreted -o portrait as "do not rotate the document" and -o landscape as "do rotate the document". If the interpretation of those options changed, Okular needs to be adapted.
Comment 10 Kevin Kofler 2013-11-30 18:32:26 EST
(In fact, I am the one to blame for that code in Okular.)
Comment 11 Tim Waugh 2013-12-02 05:58:37 EST
Regardless of how CUPS rotates or doesn't rotate the document, it has been generated incorrectly: a landscape 4:3 inside a portrait paper size. No amount of rotation will fix that.
Comment 12 Kevin Kofler 2013-12-02 13:04:22 EST
Yeah, that's bizarre indeed. I wonder whether this worked in the past, and if yes, how the heck it worked.
Comment 13 Fedora End Of Life 2015-01-09 15:36:13 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 14 Fedora End Of Life 2015-02-17 14:15:39 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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