On 28.06.2012 20:30, fantasai wrote:
> 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.
>> 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'.
Yes, sure, I know that part. I understand and agree. I don't object for
this to be the default.
I'm just saying that if I make a page specifically for print, I must be
able to explicitly say "I don't want this 'make it look like on the
screen' hack, I want the full device resolution, render the page with
this". I need a (document-wide) CSS rule that sets device pixel == CSS
pixel, or alternatively a concrete dpi value that affects CSS pixels.
I just want my page to use the full printer resolution, I want 4920 CSS
pixel width for a printed DIN A4 page, that's all. That must be possible.