Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Printing in 600 dpi
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
fantasai  
View profile  
 More options Jun 28 2012, 2:16 am
Newsgroups: mozilla.dev.tech.layout
From: fantasai <fantasai.li...@inkedblade.net>
Date: Wed, 27 Jun 2012 23:16:30 -0700
Local: Thurs, Jun 28 2012 2:16 am
Subject: Re: Printing in 600 dpi
On 06/27/2012 08:21 AM, Ben Bucksch wrote:

> I am unclear about gecko's dpi handling while printing.

> I need to have the webpage rendered with 600 dpi, i.e. an image with 600 pixels width should print with 1 inch width.
> Currently, the engines assumes web-like 100 dpi and prints in 6 inches.
> In my case, it's not a static <img>, but about a <div> that's built by JS. When the JS on the webpage asks about the size of
> the <div> in px, it must get 3000px as answer, but the <div> must print in say 21cm, printing these 3000px in these 21cm width.

> pref("layout.css.dpi", 600); (I'm in XULRunner) sounds like what I need, but it doesn't help.
> I tried <container style="width: 20cm"><div style="3000px">...</div></container>, but that doesn't work, it causes overflow.
> Also, printSettings.shrinkToFit = true; and printFrame.markupDocumentViewer.fullZoom = 10; don't help.

> I lack background knowledge about the layout engine to know how to approach this problem. Can somebody please point me in the
> right direction?

In CSS, the ratio of px to cm is fixed, so for a 600px image you want printed at 600dpi,
size your image as 1in, rather than as 600px, and it should print properly.

~fantasai


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.