|
Posted by Phil Powell on September 14, 2004, 9:01 am
Please log in for more thread options
I am trying to print out an HTML document that has MARGINWIDTH set to
1, however, upon printing, HTML table cell contents are cut off, for
exmample:
<table border="0" width="780">
<tr>
<td>Hello, this is a long piece of text that should be printed in
its entirety</td>
</tr>
</table>
However, this is what the user sees upon printout:
[Quote]
Hello, this is a long piece of text that should be printed in its ent
[/Quote]
I have set the font settings to be as small as possible and
MARGINWIDTH to 1, to no avail. If the user uses IE to print, it gets
cut off, if I use Firefox 0.6, the font and margins seem small enough
to print everything in its entirety.
What can I do to allow for the users out there to universally print
HTML documents without cutoff? Asking them to switch browsers is
unreasonable and undoable.
Thanx
Phil
|
|
Posted by Neal on September 14, 2004, 12:07 pm
Please log in for more thread options
wrote:
> I am trying to print out an HTML document that has MARGINWIDTH set to
> 1, however, upon printing, HTML table cell contents are cut off, for
> exmample:
>
> <table border="0" width="780">
> <tr>
> <td>Hello, this is a long piece of text that should be printed in
> its entirety</td>
> </tr>
> </table>
>
> However, this is what the user sees upon printout:
>
> [Quote]
> Hello, this is a long piece of text that should be printed in its ent
> [/Quote]
How many pixels wide is the paper? Less than 780?
You've discovered one of the drawbacks of fixed width design.
Congratulations.
> I have set the font settings to be as small as possible and
> MARGINWIDTH to 1, to no avail. If the user uses IE to print, it gets
> cut off, if I use Firefox 0.6, the font and margins seem small enough
> to print everything in its entirety.
>
> What can I do to allow for the users out there to universally print
> HTML documents without cutoff? Asking them to switch browsers is
> unreasonable and undoable.
Using a print stylesheet is recommended.
|
|
Posted by Harlan Messinger on September 14, 2004, 12:34 pm
Please log in for more thread options
> wrote:
>
> > I am trying to print out an HTML document that has MARGINWIDTH set to
> > 1, however, upon printing, HTML table cell contents are cut off, for
> > exmample:
> >
> > <table border="0" width="780">
> > <tr>
> > <td>Hello, this is a long piece of text that should be printed in
> > its entirety</td>
> > </tr>
> > </table>
> >
> > However, this is what the user sees upon printout:
> >
> > [Quote]
> > Hello, this is a long piece of text that should be printed in its ent
> > [/Quote]
>
> How many pixels wide is the paper? Less than 780?
This leads me to a question that should have occurred to me before: What
*are* browsers treating as a "pixel" for printing purposes? If I'm using a
1200 dpi printer, shouldn't a fixed-width 720 pixel page by printing less
than an inch wide? In fact, that doesn't happen, leading me to think that
something entirely different is going on.
>
> You've discovered one of the drawbacks of fixed width design.
> Congratulations.
>
|
|
Posted by Jukka K. Korpela on September 14, 2004, 9:31 pm
Please log in for more thread options
> What
> *are* browsers treating as a "pixel" for printing purposes? If I'm
> using a 1200 dpi printer, shouldn't a fixed-width 720 pixel page by
> printing less than an inch wide? In fact, that doesn't happen,
It doesn't indeed, and it wasn't meant to happen.
HTML 3.2 said, at the end of the definition of tables:
"Note that pixel values for width and height refer to screen pixels, and
should be multiplied by an appropriate factor when rendering to very high
resolution devices such as laser printers. For instance if a user agent
has a display with 75 pixels per inch and is rendering to a laser printer
with 600 dots per inch, then the pixel values given in HTML attributes
should be multiplied by a factor of 8."
http://www.w3.org/TR/REC-html32.html#table
HTML 4.01 refers (at http://www.w3.org/TR/html4/types.html#h-6.6 ) to the
CSS 1 specification "for information about the definition of a pixel".
And there we find (at http://www.w3.org/TR/REC-CSS1#length-units ) an
interesting "definition":
"Pixel units - - are relative to the resolution of the canvas, i.e. most
often a computer display. If the pixel density of the output device is
very different from that of a typical computer display, the UA should
rescale pixel values. The suggested reference pixel is the visual angle
of one pixel on a device with a pixel density of 90dpi and a distance
from the reader of an arm's length. For a nominal arm's length of 28
inches, the visual angle is about 0.0227 degrees."
Instead of really defining what a pixel is, it talks about "suggested
reference pixel" and about need to rescale when a device's pixel density
is "very different" from typical screen pixel. This is very vague indeed.
If I change the screen resolution from, say, 1024 by 768 to
1152 by 864 or vice versa, does the density become "very different"?
Browsers seem to think it doesn't. Scaling is performed for print media,
but not according to screen resolution.
--
Yucca, http://www.cs.tut.fi/~jkorpela/ Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
|
|
Posted by Phil Powell on September 16, 2004, 8:43 am
Please log in for more thread options >
> > What
> > *are* browsers treating as a "pixel" for printing purposes? If I'm
> > using a 1200 dpi printer, shouldn't a fixed-width 720 pixel page by
> > printing less than an inch wide? In fact, that doesn't happen,
>
> It doesn't indeed, and it wasn't meant to happen.
>
> HTML 3.2 said, at the end of the definition of tables:
> "Note that pixel values for width and height refer to screen pixels, and
> should be multiplied by an appropriate factor when rendering to very high
> resolution devices such as laser printers. For instance if a user agent
> has a display with 75 pixels per inch and is rendering to a laser printer
> with 600 dots per inch, then the pixel values given in HTML attributes
> should be multiplied by a factor of 8."
> http://www.w3.org/TR/REC-html32.html#table >
> HTML 4.01 refers (at http://www.w3.org/TR/html4/types.html#h-6.6 ) to the
> CSS 1 specification "for information about the definition of a pixel".
> And there we find (at http://www.w3.org/TR/REC-CSS1#length-units ) an
> interesting "definition":
> "Pixel units - - are relative to the resolution of the canvas, i.e. most
> often a computer display. If the pixel density of the output device is
> very different from that of a typical computer display, the UA should
> rescale pixel values. The suggested reference pixel is the visual angle
> of one pixel on a device with a pixel density of 90dpi and a distance
> from the reader of an arm's length. For a nominal arm's length of 28
> inches, the visual angle is about 0.0227 degrees."
>
> Instead of really defining what a pixel is, it talks about "suggested
> reference pixel" and about need to rescale when a device's pixel density
> is "very different" from typical screen pixel. This is very vague indeed.
> If I change the screen resolution from, say, 1024 by 768 to
> 1152 by 864 or vice versa, does the density become "very different"?
> Browsers seem to think it doesn't. Scaling is performed for print media,
> but not according to screen resolution.
You seem the one that I should ask how to ensure that an HTML page
with tables with set width (or no set width?) can always be printed
out without the margins cutting off text. My company is saying that
certain dynamically-genereated pages after Sept 7 will do this while
none before Sept 7 will do this (no changes to the HTML page that
generates this stuff has been done since Jan 2004).
Thanks
Phil
|
| Similar Threads | Posted | | html for print | January 2, 2006, 5:00 am |
| Format print using html? Please help | October 5, 2004, 1:13 pm |
| To print a HTML page as I want | October 30, 2004, 3:09 pm |
| HTML Reports, want to print the report heading on each page... | November 15, 2004, 12:01 am |
| Can I send multiple html pages to print one at a time | October 10, 2006, 8:47 pm |
| How to separate a html text in order to print them in individual pages? | January 28, 2005, 4:28 am |
| How to separate a html text in order to print each part in individual pages? | January 28, 2005, 4:30 am |
| margins on cleared floats in Opera | November 5, 2006, 11:34 am |
| suppressing margins on | September 18, 2005, 5:08 pm |
| Redisplaying for print | February 25, 2006, 9:31 am |
|