How can i print a webpage exactly how it looks like -- I mean with background images and colors?
(In IE)
Best Zeesahn
How can i print a webpage exactly how it looks like -- I mean with background images and colors?
(In IE)
Best Zeesahn
In IE this is configurable from the browser. Check this tutorial for the details. Though I suspect you are looking for a css solution. I have not been able to accomplish this in a consistent fashion.
This is probably the best solution I have come across. It involves list-style... rules to attempt to get the job done. good luck.
#ti\tle { /* 6. */
display: list-item; /* 1. */
list-style-image: url(banner.jpg); /* 2. */
list-style-position: inside; /* 3. */
letter-spacing: -1000em; /* 4. */
font-size: 1pt; /* 5. */
color: #fff; /* 5. */
}
Some annotations:
That's all. It works in IE6, Firefox 1.0 and 1.5 and Opera 8.5 - don't know about Safari, but I expect no problems. Konqueror 3.5 shows a black "H" just below the banner - however, the
By default, Internet Explorer (and some other browsers too, like Opera or Maxthon for instance) prints a webpage without any background images or colors. To print a webpage with all the background images or colors, open Internet Explorer and go to Tools->Internet Options->Advanced. In the Settings window, you will need to scroll down until you find the Printing->Print background colors and images option and check it. After you did that press Apply, then Ok and this should solve the printing problem.
In short, try using a print stylesheet.
Check this question for more info:
// In your asp file, create a vbscript variable named prnMode and set it // to true when in print mode. Then surround your entire tag with this
<body>
<% If prnMode Then %>
<div style="visibility: visible;">
<% End If %>
... your web page goes here
<% If prnMode Then %>
</div>
<% End If %>
</body>
// I did not actually print, but print preview now displays colors and imgs.
Put images in HTML not in CSS
HTML
<img src="../some_images.jpg" />
not
background-images:url(../some_images.jpg);