Issue 79847 in chromium: Page set to landscape by CSS is printed with portrait dimensions

1,431 views
Skip to first unread message

chro...@googlecode.com

unread,
Apr 19, 2011, 5:53:07 AM4/19/11
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: OS-Linux Area-Undefined Type-Bug Pri-2

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

chro...@googlecode.com

unread,
Apr 19, 2011, 7:36:50 AM4/19/11
to chromi...@chromium.org

Comment #1 on 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

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

chro...@googlecode.com

unread,
Apr 19, 2011, 10:41:28 PM4/19/11
to chromi...@chromium.org
Updates:
Labels: Action-FeedbackNeeded

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

chro...@googlecode.com

unread,
Apr 20, 2011, 8:41:48 AM4/20/11
to chromi...@chromium.org

Comment #3 on 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

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

chro...@googlecode.com

unread,
Apr 20, 2011, 8:45:52 AM4/20/11
to chromi...@chromium.org

Comment #4 on 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

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

chro...@googlecode.com

unread,
Apr 23, 2011, 1:58:42 AM4/23/11
to chromi...@chromium.org

Comment #5 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

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.

chro...@googlecode.com

unread,
Apr 23, 2011, 3:47:04 AM4/23/11
to chromi...@chromium.org

Comment #6 on 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

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.

chro...@googlecode.com

unread,
May 4, 2011, 7:14:37 AM5/4/11
to chromi...@chromium.org

Comment #7 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

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

chro...@googlecode.com

unread,
May 4, 2011, 7:47:00 AM5/4/11
to chromi...@chromium.org

Comment #8 on 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

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?

chro...@googlecode.com

unread,
May 5, 2011, 1:13:11 AM5/5/11
to chromi...@chromium.org

Comment #10 on 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

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).


chro...@googlecode.com

unread,
May 5, 2011, 2:18:36 AM5/5/11
to chromi...@chromium.org

Comment #11 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

Have you tried with Chromium 13.x? It seems to do a better job here.

chro...@googlecode.com

unread,
May 5, 2011, 2:46:52 AM5/5/11
to chromi...@chromium.org

Comment #12 on 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

Gentoo has only 12.xx available and masked. 13.xx is not available at all.

chro...@googlecode.com

unread,
May 5, 2011, 3:10:16 AM5/5/11
to chromi...@chromium.org

Comment #13 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

http://build.chromium.org/f/chromium/continuous/linux64/LATEST/

be sure to use a different profile: --user-data-dir=/tmo/foo

chro...@googlecode.com

unread,
May 5, 2011, 4:58:12 AM5/5/11
to chromi...@chromium.org

Comment #14 on 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

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

chro...@googlecode.com

unread,
Jul 12, 2011, 4:59:16 AM7/12/11
to chromi...@chromium.org

Comment #15 on issue 79847 by andrew.p...@gmail.com: Page set to landscape
by CSS is printed with portrait dimensions
http://code.google.com/p/chromium/issues/detail?id=79847

Agree with kamilkaminski000, Chrome should default to landscape when CSS
tells it to.

chro...@googlecode.com

unread,
Oct 6, 2011, 7:26:26 PM10/6/11
to chromi...@chromium.org

Comment #18 on issue 79847 by ligim...@chromium.org: Page set to landscape
by CSS is printed with portrait dimensions
http://code.google.com/p/chromium/issues/detail?id=79847

Could you please provide us with a link to get the sample CSS ?

chro...@googlecode.com

unread,
Oct 7, 2011, 3:59:36 AM10/7/11
to chromi...@chromium.org

Comment #19 on 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

The CSS is located in sample .html files already provided.

chro...@googlecode.com

unread,
Jul 2, 2012, 10:39:41 PM7/2/12
to chromi...@chromium.org

Comment #20 on issue 79847 by helgi.r...@gmail.com: Page set to landscape
by CSS is printed with portrait dimensions
http://code.google.com/p/chromium/issues/detail?id=79847

Please can the browser respect CSS settings... size: landscape currently
has an effect... a strange effect... hides the options to select either
Portrait or Landscape, BUT the option Portrait is selected!


chro...@googlecode.com

unread,
Aug 21, 2012, 1:24:05 AM8/21/12
to chromi...@chromium.org
Updates:
Status: Fixed
Labels: -Area-Undefined -Action-FeedbackNeeded Area-Internals
Feature-Printing

Comment #22 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

I believe this is fixed in newer version of Chrome. In print preview,
chrome79847-1.html came up in landscape mode as specified by the CSS.

Reply all
Reply to author
Forward
0 new messages