473,566 Members | 2,908 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing Background colors

I read the faq, and it mentions that IE 4 on windows requires setting a
printing option to allow background colors to be printed.

Things change, life goes on, other browsers come into existence....

So, is there a way in CSS to say "Yeah, print these background colors",
without the user having to turn on an option that will then apply to all
pages printed?

Thanks,

--
J.B.Moreno
Aug 19 '05 #1
16 3927
Els
J. B. Moreno wrote:
I read the faq, and it mentions that IE 4 on windows requires setting a
printing option to allow background colors to be printed.

Things change, life goes on, other browsers come into existence....

So, is there a way in CSS to say "Yeah, print these background colors",
without the user having to turn on an option that will then apply to all
pages printed?


Fortunately not. I don't want you to have any power over how much
(coloured) ink I have to pay for :-)

NB: ask on Usenet, get reply on Usenet. Don't set email to poster
headers.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: The Smiths - Bigmouth Strikes Again
Aug 19 '05 #2
Els <el*********@ti scali.nl> wrote:
J. B. Moreno wrote: -snip-
So, is there a way in CSS to say "Yeah, print these background colors",
without the user having to turn on an option that will then apply to
all pages printed?


Fortunately not. I don't want you to have any power over how much
(coloured) ink I have to pay for :-)


Well, the intended printer(s) would be laser printers, but if it can't be
done, it doesn't matter.

Thanks, guess instructions will be in order...
NB: ask on Usenet, get reply on Usenet. Don't set email to poster
headers.


I used the Mail-Copies-To header, which as it's name suggest, requests a
mail COPY of the usenet post be sent to me. I'm not trying to move the
discussion off of usenet or anything else like that -- this isn't a drive
by post, and while I don't read the group a lot, I am subscribed to it.

--
J.B.Moreno
Aug 19 '05 #3
J. B. Moreno wrote:
Els <el*********@ti scali.nl> wrote:
J. B. Moreno wrote:
So, is there a way in CSS to say "Yeah, print these background colors",
without the user having to turn on an option that will then apply to
all pages printed?


Fortunately not. I don't want you to have any power over how much
(coloured) ink I have to pay for :-)


Well, the intended printer(s) would be laser printers, but if it can't be
done, it doesn't matter.


You think laser printers don't use ink (or toner or something)?!
Aug 19 '05 #4
J. B. Moreno wrote:
I read the faq, and it mentions that IE 4 on windows requires setting a
printing option to allow background colors to be printed.

Things change, life goes on, other browsers come into existence....

So, is there a way in CSS to say "Yeah, print these background colors",
without the user having to turn on an option that will then apply to all
pages printed?


No. But there is a way to specify different CSS for printing, so you
can avoid many problems. E.g., in one site I have:

@media print
{ a, a:link, a:visited, a:active, a:hover { color:#000; }
body, html { margin:0; padding:0; }
html { background-color:#fff; background-image:none; }
}
Aug 19 '05 #5
Harlan Messinger <hm************ *******@comcast .net> wrote:
J. B. Moreno wrote:
Els <el*********@ti scali.nl> wrote: -snip-
Fortunately not. I don't want you to have any power over how much
(coloured) ink I have to pay for :-)


Well, the intended printer(s) would be laser printers, but if it can't
be done, it doesn't matter.


You think laser printers don't use ink (or toner or something)?!


Except for thermal printers, they all use SOMETHING (and they use
electricity). But color ink is a lot more expensive than toner on a
standard laser printer (don't know about color laser printers, but at a
guess, I'd say more than them too).

Besides that -- I know how to fake it, so if the point was to use up your
expensive ink, it could be done (the foreground color prints, so there you
are), I was just looking for something that wouldn't be more trouble than
it's worth.

--
J.B.Moreno
Aug 19 '05 #6
C A Upsdell <""cupsdellXXX\ "@-@-@XXXupsdell.com "> wrote:
J. B. Moreno wrote:
I read the faq, and it mentions that IE 4 on windows requires setting a
printing option to allow background colors to be printed.

Things change, life goes on, other browsers come into existence....

So, is there a way in CSS to say "Yeah, print these background colors",
without the user having to turn on an option that will then apply to
all pages printed?


No. But there is a way to specify different CSS for printing, so you
can avoid many problems. E.g., in one site I have:

@media print
{ a, a:link, a:visited, a:active, a:hover { color:#000; }
body, html { margin:0; padding:0; }
html { background-color:#fff; background-image:none; }
}


I was hoping for something along those lines, but with background-color
being respected -- your example implies that it is respected (your setting
the background-color to white) under those circumstances, but I'd guess
that's a false hope based upon the other comments.

--
J.B.Moreno
Aug 19 '05 #7
J. B. Moreno wrote:
C A Upsdell <""cupsdellXXX\ "@-@-@XXXupsdell.com "> wrote:
J. B. Moreno wrote:
I read the faq, and it mentions that IE 4 on windows requires setting a
printing option to allow background colors to be printed.

Things change, life goes on, other browsers come into existence....

So, is there a way in CSS to say "Yeah, print these background colors",
without the user having to turn on an option that will then apply to
all pages printed?


No. But there is a way to specify different CSS for printing, so you
can avoid many problems. E.g., in one site I have:

@media print
{ a, a:link, a:visited, a:active, a:hover { color:#000; }
body, html { margin:0; padding:0; }
html { background-color:#fff; background-image:none; }
}

I was hoping for something along those lines, but with background-color
being respected -- your example implies that it is respected (your setting
the background-color to white) under those circumstances, but I'd guess
that's a false hope based upon the other comments.


Hmmm, actually I set the background colour to white, assuming the paper
is white, so that Print Preview gives me a reasonable representation of
what will be printed, and so that the background will be white if the
user's browser is configured to print backgrounds.

Of course, one of my motives for specifying CSS for printing is to
prevent ink/toner from being wasted in printing unnecessary backgrounds.

BTW, if you plan to tell the user how to enable background printing, one
of my FAQs may help you: http://www.upsdell.com/site/faq.htm#print


Aug 19 '05 #8
In article <20************ *******@newsrea der.com>,
J. B. Moreno <pl***@newsread ers.com> wrote:
C A Upsdell <""cupsdellXXX\ "@-@-@XXXupsdell.com "> wrote:
[...]
@media print


[...]
I was hoping for something along those lines, but with background-color
being respected -- your example implies that it is respected (your setting
the background-color to white) under those circumstances, but I'd guess
that's a false hope based upon the other comments.


The essential thing is to realise that on the 'net the end user is
always in control, not the author. As an author you can make suggestions
as to how you think your content would best be presented, but no more.
You have zero control. The user has all control. (Whether a given user
is aware of that is a different issue.)

It's no different from Usenet: I'm typing this in my preferred
newsclient, with my preferred font, fontsize and colours. You'll read it
in your preferred newsclient, with your preferred font, fontsize,
colours, etc.

--
Sander Tekelenburg, <http://www.euronet.nl/%7Etekelenb/>
Aug 19 '05 #9
te******@eurone t.nl wrote:
In article <20************ *******@newsrea der.com>,
J. B. Moreno <pl***@newsread ers.com> wrote:
C A Upsdell <""cupsdellXXX\ "@-@-@XXXupsdell.com "> wrote:


[...]
@media print


[...]
I was hoping for something along those lines, but with background-color
being respected -- your example implies that it is respected (your
setting the background-color to white) under those circumstances, but
I'd guess that's a false hope based upon the other comments.


The essential thing is to realise that on the 'net the end user is
always in control, not the author. As an author you can make suggestions
as to how you think your content would best be presented, but no more.
You have zero control. The user has all control. (Whether a given user
is aware of that is a different issue.)


As an author, it's my job to at least try to present my stuff in what I
think will be the most effective manner: that does the job with the least
effort and maximum rewards.

Letting the reader override what I do is fine, not allowing me to do it in
the first place is another matter entirely.

And while it makes sense to automatically block background colors and
images from printing where the media type is "all" or "screen", it doesn't
make sense to automatically block them when the media type is "print".

Creating a good UI to present the choices to the user, may be more work
than anyone wants to do, but that doesn't change the fact that there is a
difference between the two situations.

In fact, by NOT acknowledging the difference, the most likely result is
that the author will take control away from the user -- for instance, I'll
probably use foreground colors, absolute positioning, and Z-index to get
the result I want, and the user won't be able to turn it off (in this
context, that doesn't really matter, as the user wouldn't really have a
choice anyway, but in general, it's a bad thing, and it's a PITA for me).

--
J.B.Moreno
Aug 22 '05 #10

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

Similar topics

4
8670
by: Scott | last post by:
There is a setting in IE for "Print background colors and images." I've noticed that without checking this option, a web page will print CSS lines between table rows, but a background color of say the header won't. The below style will display the borders in print preview, but won't display the background color. Does anyone know if it's...
0
1866
by: Yarik | last post by:
Hello, When I open an HTML document by Internet Explorer 6 and then print the document on a color inkjet printer, some of the colors are rendered incorrectly (they appear much darker than they should be, almost black). The exact version of IE is 6.0.2800.1106 (with all patches applied). The printer is Canon S330. Examples of "suffering"...
3
4742
by: Peter Williams | last post by:
Hi All, I want to write some javascript for a html page which does the following. Imagine that the page contains a table with 2 columns and 3 rows, e.g.: +---+---+ | A | B | +---+---+
4
4082
by: Franklin | last post by:
WITHOUT KNOWING ANYTHING ABOUT THE CURRENT COLORS, I want to swap the foreground/background colors of a link when someone hovers over it. Is this possible with HTML, CSS, DOM, & JavaScript? If so, how? See my HTML below (or go to my test page at http://fmbbowen.com:39353/misc/Misc.html). I also tried treating ..color as a number and...
2
1608
by: Steffen Loringer | last post by:
Hi group, I like to print my ASP.NET page with the internet explorer. I added a panel (with a black border and blue as background) and a button to my page. If I press print in the Internet Explorer, the panel is printed without the blue background but with the black border. The normal button is printed as seen on screen. What is the...
2
3024
by: letsgetsilly | last post by:
I'm developing the external corporate website for my company in Visual Studio 2003 using html, css, and a user web control for the header/navigation. When I try to print any of the pages only the header image (an <img> located in the Web User control) and the footer (also <img>) will print, but none of the text, graphics, background colors, or...
1
1409
by: Chris Dunaway | last post by:
I have a simple .asp page in which is included an IFrame that loads and Asp.Net page. The asp.net page takes and xml document and uses an xslt transformation to generate the html for output. The output is just a viewable only report. Inside the .aspx page, I have registered a simple client side script to print the contents of the IFrame...
3
5045
by: =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post by:
Is there a way to force printing in black and white programatically?
1
2027
by: JeffP | last post by:
A customer is reporting that all reports are printing with a greeny background. When previewed they have what looks like a light-grey background. I can see this as they are not local. They say other things like Word documents print fine, only the Access reports are doing this. They print fine on my system. They all are formatted for white...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8108
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7644
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.