[Web4lib] Printing Web Pages

Bob Rasmussen ras at anzio.com
Fri Apr 21 12:22:25 EDT 2006


On Thu, 20 Apr 2006, Charles Gambrell wrote:

> We seem to encounter more and more pages that fail to print as our customers
> want.  The right side of the web page is not printed.
>
> Does anyone have a fairly easy solution for this problem?

Of all the printing problems I've tackled, that's the one I haven't
conquered. I could've made millions...

The following focuses mostly on printing web pages, not designing web
pages.

The short answer is that IE7 has made a good stab at fixing the problem.
It is available in beta now, and is pretty stable. It solves the problem
by defaulting to shrink-to-fit mode. Also, in Print Preview it allows
dynamically moving the margins.

Apart from IE7, the only solution seems to be to set your margins wide
enough, and/or set the orientation to landscape.

The problem as I understand it:

Many web pages are designed within a table (or frame) structure, in which
the width of the table is FIXED, in order to make the pictures (and/or
ads) look right. You can tell this is the case if you resize your browser
window and the layout doesn't change.

The width of the table is in (screen) pixels. When IE goes to print this,
it must scale this somehow to fit the page. My experimentation suggests
that it is using a factor of 96 screen pixels per inch (of paper). Thus a
CNN.COM news story with a 770 pixel table width prints just over 8 inches
wide. True to form, I must switch to landscape to see it all (including
the ads :-) ). This 96DPI figure does not seem to be configurable
anywhere.

I wish I had an answer for this...

Regards,
....Bob Rasmussen,   President,   Rasmussen Software, Inc.

personal e-mail: ras at anzio.com
 company e-mail: rsi at anzio.com
          voice: (US) 503-624-0360 (9:00-6:00 Pacific Time)
            fax: (US) 503-624-0760
            web: http://www.anzio.com


More information about the Web4lib mailing list