Google Answers Logo
View Question
 
Q: Need HTML help: Printing a page ( Answered,   4 Comments )
Question  
Subject: Need HTML help: Printing a page
Category: Computers > Internet
Asked by: respree-ga
List Price: $5.00
Posted: 30 Apr 2003 19:21 PDT
Expires: 30 May 2003 19:21 PDT
Question ID: 197755
Greetings.  I can't seem to figure out why this is not working and
hope somebody knows this off the top of their head.

I am having a problem printing this webpage.  The right part of this
text is getting cut off on my printer (HP Laserjet IV).  The document
was written in MS Word, then saved as an HTML document.  That HTML
code was placed into a single-celled, table (through DreamWeaver)
which is sized at 80% of the browser width.

It displays as intended in my browser, but when I print it, the right
side of the text get cut off.  I don't know if Word has put a bunch of
weird formatting codes that didn't get translated properly when I
saved it as HTML, but could someone please take a look and let me know
the correction I should make to the HTML to correct this problem.

Thanks in advance for your help.

Here's the link.
http://www.zenpalace.com/printproblem.html
Answer  
Subject: Re: Need HTML help: Printing a page
Answered By: serenata-ga on 30 Apr 2003 19:54 PDT
 
Hi Respree ~

Off the top of my head ...

The reason your page cuts off the right side of your page has to do
with the way a browser presents HTML for you to view as opposed to the
way MS Word presents a document for you to view.

When you converted your document to html within a table, the table's
width was set at 80% of your browser's window, and depending on the
resolution of your system and the size of your browser's window, the
page takes 80 percent of that.

For instance, with a 21" monitor, resolution set at 1152 pixels, 80%
width would be 921 pixels in width, which would be much too wide for a
printer.


** Microsoft's "official" word on this phenomenon is as follows:

"When you print a Web page that contains a table that is wider than
the print area, the right side of the table may not be printed, and a
second page that includes the truncated part of the table may not be
printed."

And they offer the following workaround:

"To work around this issue, either reduce the page margins or print
the page in Landscape mode to increase the printable area."

Here's how to reduce the margins:
 - On the File menu, click Page Setup.
 - Under Margins, type 0 in the Left box and the Right box.
 - Click OK.
 - Print the page again.

If it's still too wide because of the table, you can always change the
width of the table from 80% to about 500 pixels, and it should print
out fine in portrait mode at that width.

Microsoft says this was "by design" (which means they're not going to
fix it), and then recommend you print in landscape if nothing else
works.

See: Microsoft Knowledge Base Article - 260642 -
 - http://support.microsoft.com/default.aspx?scid=kb;en-us;260642


Note: Even though the above workaround is intended for Internet
Explorer, it works on all of the browsers on my computer (I have about
7).

*** Microsoft search terms
     - printing web pages

Hope this helps,
Serenata

Request for Answer Clarification by respree-ga on 30 Apr 2003 21:45 PDT
Thank you for your response.  I'm afraid I am not yet ready to rate
your answer, as I am not sure if I agree there is no solution to my
problem.  I do not wish to play with page set ups (as this document
must be printed by anyone who goes to it) nor do I want to decrease
the width at which it is displayed in a browser.

While I cannot disagree that the boys at Microsoft acknowledge this to
be a problem, please look at the following page.  In terms of the
table, it contains precisely the same setup as my original post, with
an exception.

This is a table set to 80% of the browser's width.  It contains only
plain text with which was cut and pasted from a .txt file.  When I
print this page, the words wrap properly and prints properly.  This
seems to suggest that there is an HTML answer to my problem.

Please follow the link below:
http://www.zenpalace.com/printproblemjusttext.html

I do not wish to rate your answer with less than a 5, but I hope you
can understand that I cannot do so without an answer to my original
question, which is "how can I adjust the HTML so that the page prints
properly."

If you are pretty firm that there is no HTML answer, I will accept an
answer as to why the link above prints properly, but the link on my
original question does not.

In fairness to you, I will give you an opportunity to continue with
your response before I rate your answer.

Thank you for your help.

Clarification of Answer by serenata-ga on 30 Apr 2003 23:56 PDT
Hello again Respree ~

A quick Google search using the term "problem printing web pages"
(note, I did not use the quotation marks in my search) returns over
664,000 relevant pages with that information.

 - ://www.google.com/search?hl=en&ie=ISO-8859-1&q=problems+printing+web+pages

I know that many people have problems printing web pages because of 
those reasons I stated in my answer.

For what it's worth, I had no problems at all printing out your
resume, and I did not, on any of my browsers on either of my printers
have any problems printing it at all. There was no page cutoff.


Using Netscape 4.79 ~ 

The page in Netscape 4.x is totally right justified. I can print your
your resume out on my own printer with no difficulty, except there is
a 2-1/8 inch margin on the right side (which is due to your 80% table
setting being interpreted by my printer as 80% of the printable area
as well). The left margin is .5 inch. The resume stretches to three
pages. In my printer control, there is a "shrink to fit" command which
is checked.

Using Mozilla 1.3 ~

I can print your resume out with no problem. The margins are
equidistant, and there is no right justification as it appears online.
The settings within the browser are "shrink to fit" Here's a
screenshot of what it looks like in print preview in Mozilla:
 - http://209.151.82.182/txt1.jpg


Using IE 6 - It looks and prints the same as above.


Using Opera 7.1 ~ It looks and prints with a 1 inch margin (opera
shrinks to fit).


Using Phoenix ~ It looks and prints the same as Mozilla (they're built
on the same engine)


So I am not having any problems with printing your page at all. 

But there are enough people who do have problems for it to have been a
major topic with some workarounds by Microsoft, and other hints on how
to work with it, including changing the size of the file to make it
print.

I do not know what browser you are using, and don't know how your
printer works with your browser. But you may be the only one having a
problem printing the page, too.

My printers are an HP Deskjet 712C and an HP Color Laserjet 2500 ...
it printed the same on both.


As for a 5 star rating, how you rate my answer is entirely up to you.
A 5-star rating is nice, of course, but that's not why I answered your
question.

I answered because I felt well-qualified to answer it, being aware of
the problem from several of the tech lists I participate in; and
personally having  to troubleshoot the problem for several of my
clients who experience the same thing.

When I changed their html from percentages to absolutes, it helped
with their particular printer arrangement and they were able to print
their webpages. I don't recall their printers, but I did know it was a
problem and that the work around I was able to work with in that case
was to set the width to an absolute size.

I hope this further clarifies my answer.

Serenata
Comments  
Subject: Re: Need HTML help: Printing a page
From: mvguy-ga on 30 Apr 2003 22:55 PDT
 
I got intrigued by this question and found that that solution was more
difficult than it looked due to the way the HTML was created.  (For
what it's worth, the real problem here is with Internet Explorer, not
the file. It prints fine for me, but then I don't use IE unless I have
to.)

I did come up with a possible solution, however, at least one that
worked with my résumé: I opened my résumé in OpenOffice and then saved
it as HTML.  I had to make a few simple changes (changing some <P>
tags to <BR> tags), but it printed fine in Internet Explorer.  If you
have OpenOffice (or want to take the time to download it), it's worth
a try.
Subject: Re: Need HTML help: Printing a page
From: mrpun46-ga on 01 May 2003 01:27 PDT
 
The AARP site has a basic browser tutorial which covers printing web
pages that may help you double check your options. Changing the
resolution on your monitor might help as well.
http://www.aarp.org/learninternet/basic_browsing/lesson5.html
Subject: Re: Need HTML help: Printing a page
From: j_philipp-ga on 01 May 2003 03:58 PDT
 
Hello Respree,

The bad news: Microsoft Word doesn't really let you save as HTML (even
when they make you believe they do) -- it's more like "Microsoft HTML"
which doesn't follow the standards (and thus often breaks in
browsers).

The good news, I had a quick glance at the source and the problem was
solved by removing the "width" attributes of all elements, and adding
the following CSS in the "style" section of your source:

body
{
    margin-left: 8%;
    margin-right: 8%;
}


You could also try to override the width-attribute using the
width-property for table, td, and th in a special CSS for media
"print" (using the "auto"-value), which would keep the exact current
look on screen. But above already works good so I didn't try that.

If you need any help in implementing this solution (I suggest opening
the HTML-source with Notepad and using the search-function), let me
know.


Hope it helps!
Subject: Re: Need HTML help: Printing a page
From: hammer-ga on 01 May 2003 10:38 PDT
 
Respree,

Notice that the HTML source of your second page at
http://www.zenpalace.com/printproblemjusttext.html is very plain,
straightforward and lets the browser decide what is best for sizing.

On the other hand, the problem page at
http://www.zenpalace.com/printproblem.html, is a mess of unnecessary
"instructions" that makes the source unreadable, increases load time
and confuses the heck out of the browser. All those width statements
and class definitions are preventing the browser/printer from
adjusting the content to fit the printed page.

I don't see anything in the problem page that can't be accomplished
with straight HTML. A table, a few alignment statements, and you're
done! Possibly a little light CSS, if you *really* feel the need to
get fancy. All the browsers and printers will be much happier.

- Hammer

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy