8

I am having an issue when I print my page in Chrome 26 where tables appear with grey background colour.

When I view the page in chrome with simulated CSS media print it looks fine

in browser

when printing

When printing in Safari everything works fine. Anyone knows how to fix this issue?

Kos
  • 3,847
  • 8
  • 29
  • 34
Christian R
  • 1,525
  • 3
  • 13
  • 17
  • You are defining that there should be no grey background in the Print Media declaration, right? – Aaron Brewer May 13 '13 at 19:36
  • Can we see some CSS code? – David Starkey May 13 '13 at 19:37
  • Thanks for the quick reply. I am using bootstrap css as is, with no mods. I am not explicitly declaring no grey background. Do I have to do this? I tried background-color:blue; but the table still appears grey in the print preview – Christian R May 13 '13 at 19:51
  • I have the same issue with margins. FF and IE print correctly. chrome emulation also. but chrome print output differs. – gco Feb 19 '15 at 13:38

2 Answers2

7

Here is the solution: Add this to your print css

* {transition: none !important}

See: http://wisercoder.com/print-preview-significantly-different-inspector-chrome/

gco
  • 1,540
  • 5
  • 23
  • 45
2

You can try -webkit-print-color-adjust:exact;, which overrides the setting where Chrome removes background colors. This could fix your problem.

belens
  • 962
  • 1
  • 8
  • 18
  • 3
    Doesn't seem to solve the issue unfortunately. I am still very confused why the print preview differs from the 'simulate CSS media print' setting. Shouldn't these be the same? – Christian R May 14 '13 at 17:19