http://bugzilla.suse.com/show_bug.cgi?id=964184
http://bugzilla.suse.com/show_bug.cgi?id=964184#c5
--- Comment #5 from Johannes Meixner ---
This basically proves that the printing options that are provided
by okular when you print via okular are wrong.
As far as I understand it that is basically wrong is using
both orientation-requested and fit-to-page at the same time.
Reason:
orientation-requested actually does not request an orientation
but it requests a particular rotation, see
http://cups.org/documentation.php/doc-1.5/options.html
----------------------------------------------------------------------------
The -o orientation-requested=N option rotates the page depending
on the value of N:
-o orientation-requested=3 - portrait orientation
(no rotation)
-o orientation-requested=4 - landscape orientation
(90 degrees)
-o orientation-requested=5 - reverse landscape or seascape orientation
(270 degrees)
-o orientation-requested=6 - reverse portrait or upside-down orientation
(180 degrees)
----------------------------------------------------------------------------
and that contradicts with what fit-to-page actually does.
In contrast to what is described at cups.org about fit-to-page
"The -o fit-to-page option specifies that the document
should be scaled to fit on the page"
fit-to-page does not only scale it but also rotate and translate
the content (it translates to center the content) as needed
to fit best on the page.
I.e. fit-to-page rotates, scales, and centers the content
to get it as big as possible within the imageable area of the paper.
Because both orientation-requested and fit-to-page rotate the content
they cannot be used together without possible issues.
In other words:
When fit-to-page is used no othetr option that rotates, scales,
and/or translates the content should be used.
This is the main issue here.
Applications should not use contradicting printing options.
A minor issue is that CUPS does not validate the value
of orientation-requested.
I did not check if only the old CUPS 1.5.4 does not validate the value
of orientation-requested (and perhaps also other option values).
Perhaps this issue is already fixed in newer CUPS versions.
If not, it is not a bug caused by openSUSE but in upstream CUPS.
In this case please report the issue that CUPS does not validate
option values to upstream CUPS at
http://cups.org/
Regarding the main issue:
Okular seems to use contradicting printing options.
To find out whether or not okular actually
use contradicting printing options, set up a test queue
on your workstation that outputs PostScript into a file:
0.
Set "FileDevice Yes" in /etc/cups/cups-files.conf to allow
output in a file.
Additionally one should set "LogLevel debug" in /etc/cups/cupsd.conf
to get verbose (i.e. meaningful) CUPS logging and debuig messages
in the /var/log/cups/error_log file.
After changing /etc/cups/cupsd.conf or /etc/cups/cups-files.conf
one needs to restart the cupsd.
1.
Set up the test queue:
lpadmin -p testq -v file:/tmp/testq.out.ps \
-P /usr/share/cups/model/Postscript.ppd.gz -E
and specify A4 page size
lpadmin -p testq -o PageSize=A4
3.
Print your original file from okular into the testq
4.
Inspect /var/log/cups/error_log what printing options are set.
5.
View the prining result in /tmp/testq.out.ps with Ghostscript
to see how the printout would look on paper:
gs -r50 -sPAPERSIZE=a4 -dFIXEDMEDIA /tmp/testq.out.ps
to get A4 papersize or
gs -r50 -g900x900 /tmp/testq.out.ps
to get a a big window size in pixels when the printing output
exceeds A4 paper size.
6.
Print your original file via commandline
lp -d testq -o fit-to-page file_name
7.
Inspect /var/log/cups/error_log what printing options are set.
8.
View the prining result in /tmp/testq.out.ps with Ghostscript.
--
You are receiving this mail because:
You are on the CC list for the bug.