I have a problem printing an html document. Apparently, browsers do not know how wide the paper is, and they make wild and inaccurate guesses!
The document reacts, shows different layouts of different widths, and I was hoping that when printing they would use styles of about 700 or 800 pixels in size, but they didn’t. Not all of them.
I tried changing media queries from px sizes to physical units ( pt or cm ), but that didn't help.
I also ensured that browsers were configured to use the same paper size, orientation, and margins and that they did not have the “scale to fit page” checkboxes selected.
Here is the fiddle: http://jsfiddle.net/MrLister/Lc5kE/show
If you resize the window a little, you will see that it shows how wide it is. Then, when you click Preview, it will happen when it goes wrong: IE says the A4 is 18.19 cm wide, Mozilla says 20..21cm, and Chrome says 14..15cm. Opera is the worst of all: it does not look at paper at all, it just takes the size of the window on the screen.
And, as I said, it makes no difference whether you use physical units or pixels or em .
So am I doing something wrong? Am I missing something? Is there something I can do by getting people with a fixed paper size (like A4) to go down on people?
Edit: after some testing, I found that IE takes printer fields into account, while Mozilla does not. Therefore, if you set all fields to zero, IE and Mozilla report a width of 20.21 cm. However, they are still very incompatible.