New issue 79847 by kamilkam...@gmail.com: Page set to landscape by CSS is
printed with portrait dimensions
http://code.google.com/p/chromium/issues/detail?id=79847
Chrome Version : 11.0.696.43 (Build 0)
OS Version: Gentoo Linux
URLs (if applicable) : -
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5:
Firefox 4.x: OK
IE 7/8/9:
What steps will reproduce the problem?
1. Open a page that sets @page { size: landscape } and contains i.e. table
100% width
2. Print a page to printer or PDF
3. See printed document - table width is set to portrait's width, not
landscape
What is the expected result?
To have page rendered with landscape page dimension
What happens instead?
Page is rendered using portrait dimension
Please provide any additional information below. Attach a screenshot if
possible.
Attached a screenshot of PDF printed from webpage and displayed over
webdeveloper panel with table focused. Every other element of page has
display:none in printing CSS. On Firefox 4 page is rendered correctly.
Attachments:
chromelandscape.jpg 142 KB
I have found that this is due to chrome selecting "portrait" in print page
dialog, but still - it prints 'portrait' on 'landscape' page.
Also - even changing orientation to landscape didn't allow me to print
everything - chrome printer much more behind lower page margin, and started
on next page - loosing informations that's propably being drawn on page
margin
Comment #2 on issue 79847 by the...@chromium.org: Page set to landscape by
CSS is printed with portrait dimensions
http://code.google.com/p/chromium/issues/detail?id=79847
Can you attach:
- a sample webpage that reproduces this problem
- a PDF printed from Firefox
- a PDF printed from Chromium
First test shows how Chrome prints page with defaults and after manually
selecting "landscape".
Attachments:
chrome79847-1.html 658 bytes
chrome79847-1-ff.pdf 16.9 KB
chrome79847-1-chr-defaults.pdf 20.4 KB
chrome79847-1-chr-landscape.pdf 19.9 KB
Second test shows how Chrome prints long tables in both modes. Also - it
shows that Chrome ignores table header when printing (see how Firefox
handles it - header is re-printed on every page)
Attachments:
chrome79847-2.html 5.0 KB
chrome79847-2-ff.pdf 19.1 KB
chrome79847-2-chr-defaults.pdf 23.1 KB
chrome79847-2-chr-landscape.pdf 23.4 KB
Did you have to tell Firefox to print in landscape mode to generate
chrome79847-2-ff.pdf ? When I tried a FF nightly built, it printed
portrait. In fact, I can't reproduce the chrome79847-2-ff.pdf output in any
browser with the default print settings.
No. It uses @page { size: } from CSS.
This is stable Firefox 4.0 on Gentoo, GNOME. Printed in defaults - just
pressed Ctrl+P, selected PDF, no other changes.
I still can't reproduce your test results. I loaded chrome79847-2.html in
FF 4.0.1. on a clean install of Ubuntu 11.04, printed to PDF, and got the
attached output.
Attachments:
Chrome__79847_-_2.pdf 20.3 KB
That's odd, is it possible that Gnome 2.32.1 (built on 27.04.2011) has
something to do with it? I can still reproduce this on 11.0.696.57 (Build
0).
I don't know how Chrome gets page dimensions and position from desktop, is
it possible that Gnome returns invalid dimensions?
Yes, but this report is about (2) :)
And Chromium prints in landscape mode, but uses portrait's page dimension
to do that. First problem is that Chromium sets page mode to landscape as
defined in CSS, but print dialog selects "portrait" as default option.
Browser then prints on landscape page as it was 21cm width and 29 height
(only 2/3 of landscape page is used).
Have you tried with Chromium 13.x? It seems to do a better job here.
Gentoo has only 12.xx available and masked. 13.xx is not available at all.
http://build.chromium.org/f/chromium/continuous/linux64/LATEST/
be sure to use a different profile: --user-data-dir=/tmo/foo
Looks like it's fixed in 13 :)
Altrought, in print settings dialog (chr13-defaults.pdf) "portrait" was
pre-selected, so Chromium ignored print settings and used @media print CSS
instead.
I believe it should open print settings dialog with page set to landscape
(as @media print says) and then print according to configuration from print
dialog.
Attachments:
chr13-defaults.pdf 23.4 KB
chr13-landscape.pdf 23.4 KB
Agree with kamilkaminski000, Chrome should default to landscape when CSS
tells it to.
Could you please provide us with a link to get the sample CSS ?
The CSS is located in sample .html files already provided.