On 06/28/2012 07:10 AM, Ben Bucksch wrote:
Thanks fantasai :-), for the answer.

On 28.06.2012 08:16, fantasai wrote:
so for a 600px image you want printed at 600dpi, size your image as 1in, rather 
than as 600px, and it should print properly.

Well, it's not as simple as one image, it's a Javascript library that generates the 
output. The JS lib must get "4920px" as
width from DOM/style APIs, and that must print as 21cm width in 600 dpi. That 
would solve it, and I *should* be able to set
this via CSS rules.

In CSS, the ratio of px to cm is fixed

Well, that's the problem, then. It's inherently wrong.

Yes, we realize that. Unfortunately, the correct behavior (which is described in
older revisions of CSS2.1) turned out to not be Web-compatible: the Web assumes
everyone is running 96dpi and that therefore 'width: 1in' is equal to 'width: 
96px'.
And so after a lot of debate (hundreds of messages worth), the CSSWG resolved
on the text here:
  http://www.w3.org/TR/CSS21/syndata.html#x39

You can see the changes here:
  http://fantasai.inkedblade.net/style/specs/css2.1/px-unit

~fantasai
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to