473,322 Members | 1,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Print versions of HTML cut off at margins

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:

Hello, this is a long piece of text that should be printed in its ent
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
Jul 23 '05 #1
18 12410
On 14 Sep 2004 08:01:25 -0700, Phil Powell <ph**************@gmail.com>
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:

> Hello, this is a long piece of text that should be printed in its ent

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.
Jul 23 '05 #2
Phil Powell 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"> 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.


Don't use fixed width tables.

--
Mark.
http://tranchant.plus.com/
Jul 23 '05 #3

"Neal" <ne*****@yahoo.com> wrote in message
news:op**************@news.individual.net...
On 14 Sep 2004 08:01:25 -0700, Phil Powell <ph**************@gmail.com>
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:

> > Hello, this is a long piece of text that should be printed in its ent

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.


Jul 23 '05 #4
"Harlan Messinger" <h.*********@comcast.net> wrote:
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

Jul 23 '05 #5
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message news:<Xn*****************************@193.229.0.31 >...
"Harlan Messinger" <h.*********@comcast.net> wrote:
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
Jul 23 '05 #6
Jukka K. Korpela.exe failed a Turing test with
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'd be more than a little upset if you changed to a higher screen
resolution only to find that all the images increased in size to occupy the
same portion of the screen/window!

Nik

--
I wish to be dissociated from your interpretation of my opinions

This post is encrypted by the Quad-ROT-13 method.
Any attempt to read it may constitute a breach of the DMCA
Jul 23 '05 #7
ph**************@gmail.com (Phil Powell) wrote:
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).


Sorry, my crystal ball is on vacation. Try posting the URL; maybe someone
wishes to analyze the problem if he can see it.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #8
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message news:<Xn*****************************@193.229.0.31 >...
ph**************@gmail.com (Phil Powell) wrote:
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).


Sorry, my crystal ball is on vacation. Try posting the URL; maybe someone
wishes to analyze the problem if he can see it.


Sorry, but I can't do that. The URL is an internal URL of US
Government proprietary information, unfortunately, it renders it
somewhat classified, so there is no URL I can give you. All I'm
allowed to do then is to describe the problem as best as possible in
the hopes of a solution.

Thanks
Phil
Jul 23 '05 #9
ph**************@gmail.com (Phil Powell) wrote:
The URL is an internal URL of US
Government proprietary information


Well, please feel to come back when you have a question about
HTML authoring for the World Wide Web.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #10
Jukka K. Korpela wrote:
ph**************@gmail.com (Phil Powell) wrote:
The URL is an internal URL of US
Government proprietary information


Well, please feel to come back when you have a question about
HTML authoring for the World Wide Web.


Are there are specific newsgroup for asking about HTML intended for
intranets, CD-ROMs, personal computer hard disk, etc.?
If not isn't this place the best we have?
(Not to say the OP shouldn't create a test-case for us to see.)

--
Google Blogoscoped
http://blog.outer-court.com
Jul 23 '05 #11
On 17 Sep 2004 15:43:36 GMT, Philipp Lenssen <in**@outer-court.com> wrote:
Jukka K. Korpela wrote:
ph**************@gmail.com (Phil Powell) wrote:
> The URL is an internal URL of US
> Government proprietary information


Well, please feel to come back when you have a question about
HTML authoring for the World Wide Web.


Are there are specific newsgroup for asking about HTML intended for
intranets, CD-ROMs, personal computer hard disk, etc.?
If not isn't this place the best we have?
(Not to say the OP shouldn't create a test-case for us to see.)


alt.html serves as a catch-all for most people. Nearly any HTML or
HTML-connected topic is in bounds there.
Jul 23 '05 #12
On 17 Sep 2004 07:04:51 -0700, Phil Powell <ph**************@gmail.com>
wrote:
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message
news:<Xn*****************************@193.229.0.31 >...
ph**************@gmail.com (Phil Powell) wrote:
> 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).


Sorry, my crystal ball is on vacation. Try posting the URL; maybe
someone
wishes to analyze the problem if he can see it.


Sorry, but I can't do that. The URL is an internal URL of US
Government proprietary information, unfortunately, it renders it
somewhat classified, so there is no URL I can give you. All I'm
allowed to do then is to describe the problem as best as possible in
the hopes of a solution.


Create a duplicate with replaced content. Post it on a public server.

Without that, we can't really assist.
Jul 23 '05 #13
On Fri, 17 Sep 2004, Philipp Lenssen wrote:
Are there are specific newsgroup for asking about HTML intended for
intranets,
Yes; but I don't follow them myself so I can't say how good they are.
(And they don't all start with microsoft.* )
If not isn't this place the best we have?
(Not to say the OP shouldn't create a test-case for us to see.)


But it's utterly frustrating to be asked what appears to be a bona
fide WWW question, to try to give a good answer, and then to be
slapped down with "oh no, that's no use on our Intranet".

They might at least /pretend/ for the purposes of discussion that it's
a WWW question, and find some public place to present a test-case.

Anyhow, it's been my experience of several Intranet situations that
they were considerably improved by applying WWW-appropriate
techniques. In at least one case, the motive was to avoid the risk of
prosecution for discrimination against disabled employees.
Jul 23 '05 #14
begin quote from Philipp Lenssen in <2r*************@uni-berlin.de>:
Are there are specific newsgroup for asking about HTML intended for
intranets, CD-ROMs, personal computer hard disk, etc.?
If not isn't this place the best we have?
(Not to say the OP shouldn't create a test-case for us to see.)


I think comp.infosystems.intranet fits, at least for the first of those.

--
Shawn K. Quinn
Jul 23 '05 #15
Shawn K. Quinn wrote:
begin quote from Philipp Lenssen in <2r*************@uni-berlin.de>:
Are there are specific newsgroup for asking about HTML intended for
intranets, CD-ROMs, personal computer hard disk, etc.?
If not isn't this place the best we have?
(Not to say the OP shouldn't create a test-case for us to see.)


I think comp.infosystems.intranet fits, at least for the first of
those.


You guys are certainly right. I just thought that HTML was not
restricted to the WWW -- it was great for CD-ROMs, Intranet, etc. There
is no specific "intranet" markup that is superior. And even if people
think in an Intranet they have a special context -- like, they only
need to support one browser -- later on they often find out they are
wrong (such as when they need to support more than a single browser, or
they find out the latest browser update breaks their nifty add-ons, or
they find out they have to transport portions of the system onto the
WWW).

--
Google Blogoscoped
http://blog.outer-court.com
Jul 23 '05 #16
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message news:<Xn****************************@193.229.0.31> ...
ph**************@gmail.com (Phil Powell) wrote:
The URL is an internal URL of US
Government proprietary information


Well, please feel to come back when you have a question about
HTML authoring for the World Wide Web.


I do have a question about HTML authoring for the World Wide Web, it's
just that the URL provided is under federal protection by the US
Government and thus, I cannot give it out due to its content being
classified.

The problem I'm having is that now the company is complaining that PDF
documents and other authored HTML pages on the same domain and
instance are all being cut off at the right margin, and every trick I
know to do fails to stop this from happening.

Based on your experience, what would you recommend I do so that the
documents are not cut off at the right margin?

Phil
Jul 23 '05 #17
Phil Powell <ph**************@gmail.com> wrote:
The problem I'm having is that now the company is complaining that PDF
documents and other authored HTML pages on the same domain and
instance are all being cut off at the right margin, and every trick I
know to do fails to stop this from happening.

Based on your experience, what would you recommend I do so that the
documents are not cut off at the right margin?


Two replies to your original message told you what to do:

Stop trying to print fixed-width content on media that is narrower
than the content.

Without seeing the offending documents, it's hard to be any more specific.

For PDF documents, my copy of Acrobat Reader includes a "Shrink oversized
pages to paper size" feature in the Print dialog. Opera has a "Scale print"
setting in the Print Options dialog that works similarly, except that it
must be set by hand. Other software may have similar features.

HTH
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"Red meat isn't bad for you. Fuzzy blue-green meat is bad for you."
Jul 23 '05 #18
Darin McGrew <mc****@stanfordalumni.org> wrote in message news:<ci**********@blue.rahul.net>...
Phil Powell <ph**************@gmail.com> wrote:
The problem I'm having is that now the company is complaining that PDF
documents and other authored HTML pages on the same domain and
instance are all being cut off at the right margin, and every trick I
know to do fails to stop this from happening.

Based on your experience, what would you recommend I do so that the
documents are not cut off at the right margin?


Two replies to your original message told you what to do:

Stop trying to print fixed-width content on media that is narrower
than the content.

Without seeing the offending documents, it's hard to be any more specific.

For PDF documents, my copy of Acrobat Reader includes a "Shrink oversized
pages to paper size" feature in the Print dialog. Opera has a "Scale print"
setting in the Print Options dialog that works similarly, except that it
must be set by hand. Other software may have similar features.

HTH


Thanx.. actually we are testing to see if it's not the printer itself,
which is now what I believe is the offending agent. Considering that
multiple PCs here have cut-off printouts now and it occurs in spite of
changes to IE, to Adobe Acrobat Reader and even to the HTML pages
themselves (all the while it never happens whenever I print from my
machine using Linux Red Hat and Mozilla Firefox 0.6).

Phil
Jul 23 '05 #19

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Luis Serrano | last post by:
Hi all, I'm trying to generate labels to print in several different formats, all of them with their own height,width and page margins. We've got this done in MS Access 2000, using a designed...
6
by: Terry Olson | last post by:
I need to create a Javascript and when the output is printed, I need to control the margins of the printed page very strictly, can Internet Explorers version of CSS do this? Or is there another...
0
by: Matthew Belk | last post by:
I am trying to print some 2x6 labels on a SATO CL408e thermal label printer. The 2x6 labels are arranged in "landscape" mode with 2 labels per "sheet." When I attempt to print "x" copies of a 1...
2
by: Ned | last post by:
I'm having difficulty printing on a 4"x3" labels . I set the left margin to 0 but it always prints starting from the middle of the label on the X-axis (no matter what the margin settings are.) I...
0
by: Siv | last post by:
Hi, I am working on a VB.NET application that uses the Print Preview. When I call up the print preview and print from my laser printer the whole page comes out no problem. When I do the same...
1
by: scrawnyguns | last post by:
There's probably something easy I'm missing here. When I run a print operation in my program (Microsoft VB.Net Form) I have some code that sets the print margins so that it leaves a nice gap,...
7
by: Mark | last post by:
Hi, I am creating application in VB 2005. and when I print report it adds extra 0.45 cm margin on left and top, and the reason for this is physical margins of printer. Is it possible to change...
0
by: jigsmshah | last post by:
I need to print a text file .When i print it ,it is not printed exactly form 0,0 coordiante of the page. I mean the top most left corner.It is leaving some margin from top and from left.The code is...
0
by: thirunavukarasukm | last post by:
Hai.... To print Html page using PrintDialog and Print Document i am created one windows appication.. the windows application have many pages in my booking page i have two buttons one...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.