[Okular-devel] [Bug 181290] Landscape pdf prints with wrong orientation when choosing landscape in print dialog

Kevin Kofler kevin.kofler at chello.at
Sat May 7 22:31:43 CEST 2011


https://bugs.kde.org/show_bug.cgi?id=181290





--- Comment #90 from Kevin Kofler <kevin kofler chello at>  2011-05-07 22:31:37 ---
So for starters, I think it's a bad idea to boycott this bug. Many users are
being annoyed by it and only a small vocal bunch of them complained on this
bug. That said, I understand your feeling, rude users don't make me want to
work on something either.

About 270° vs. 90° rotations, the UI only knows Portrait and Landscape, so I
think this cannot be implemented completely without a UI change. I do suspect
you may end up with upside-down documents if you print landscape documents in
portrait (i.e. rotated mode). Actually, I'd expect the 90°-rotated documents to
show up upside down and the 270°-rotated documents to show up correctly when
printed in portrait mode. (Of course, this depends on what your definition of
90° vs. 270° is: Do you use the positive angle orientation generally used in
mathematics (counterclockwise) or clockwise angle orientation? Do the PDF spec
and CUPS agree on the angle orientation?) But the common case is to print the
documents in their original orientation, where this problem does not occur.
What this patch solves is the problem that "Portrait" actually meant "Don't
rotate" and "Landscape" actually meant "Rotate 90°".

One thing that irritates me about the patch is that it adds some additional
code to detect the orientation of the document. That detection must be already
made somewhere, or we wouldn't get "Landscape" preselected for landscape
documents. I'd like the detection code to be reused, because 1. that'd allow
fixing the other format backends more easily and 2. it'd make sure that the
detection mechanisms match, so "Landscape" really only gets preselected if and
only if it will be interpreted as "Don't rotate".

Next, unfortunately, the Evince code cannot be reused at all. The UI part is in
GTK+ and the printing is done using Cairo, which is very different from
Okular's Qt UI and printing code based on sending entire files to CUPS.

Now about other formats, the bug is almost certainly still present for those
because they don't pass any orientation. (The default is portrait, which
behaves as before the patch.) Falk, there are plenty of ps.gz and dvi files
around the net, search e.g. Google Scholar for some papers and you'll find
plenty of them. OpenDocument odt files can easily be made with OpenOffice.org
Writer / LibreOffice Writer or KWord / Calligra Words. Other formats, e.g. ePub
or DjVu, may be harder to find, but there should be example files for those
formats somewhere, too. That said, the patch is also a prerequisite for making
the other formats work, as it adds the required API.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Okular-devel mailing list