Forum Moderators: not2easy

Message Too Old, No Replies

Printing White Writing

         

markflury

4:10 pm on Sep 28, 2007 (gmt 0)

10+ Year Member



I have the following code which puts a black image on the page and then white text on top of it. When I go to print preview the page, the text shows up in grey. This only happens if I go to Tools >> Internet Options >> Advanced and then uncheck 'Print background colors and images'. I'm guessing IE converts the text to grey so that it shows up because it thinks the color of the page behind the text is also white.


<span style="writing-mode: tb-rl; position:absolute; text-align: left; top:25px; width:22px; color:#FFFFFF"><b><%="test"%></b></span><img src="../../images/cd_label_side_big.jpg">

Is there anyway around this, other than checking the 'Print background colors and images'?

~ Mark

sgietz

4:44 pm on Sep 28, 2007 (gmt 0)

10+ Year Member



That's just not a good idea!

The simple answer is no. This is strictly user defined.

Another thing to consider is that if people did have that box checked, you would be wasting their black ink and they wouldn't be very happy about that.

There is a crucial difference between print and screen (CMYK and RGB). One is based on white (CMYK) and one is based on black (RGB). If people would want to print the graphic/text you are referring to, include instruction on how to configure their printers, otherwise stick with black on white. That's much more user friendly.

markflury

4:52 pm on Sep 28, 2007 (gmt 0)

10+ Year Member



This is for an internal application. Internal users will be printing these pages and I want to make sure their prints are always the same, regardless of if they have that button checked or not. There has to be some way around this.

~ Mark

mattur

4:54 pm on Sep 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could possibly use a print stylesheet to change the text colour to e.g. black when printed. In the <head> link as below and put your styles in print.css

<link rel="stylesheet" href="print.css" type="text/css" media="print">

markflury

5:05 pm on Sep 28, 2007 (gmt 0)

10+ Year Member



But I need the text to be White.

~ Mark

mattur

5:20 pm on Sep 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use an image

markflury

5:29 pm on Sep 28, 2007 (gmt 0)

10+ Year Member



The writing is always changing...

~ Mark

jimbeetle

5:39 pm on Sep 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can you just set a background color and not use the image?

<p style="color:ffffff; background-color:000000">This is my text</p>

markflury

5:42 pm on Sep 28, 2007 (gmt 0)

10+ Year Member



Nope, because then you have to check the 'Print background colors and images' button under settings.

I don't think this is possible...

~ Mark

mattur

7:12 pm on Sep 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Mark,

A-ha! Just thought - you could display a black image inline then absolutely position the white text over the image. You may have to do some jiggery-pokery to re-size the image according to the length of the text, but I think this is a viable method. HTH.

markflury

7:15 pm on Sep 28, 2007 (gmt 0)

10+ Year Member



I think that is what my initial code is doing, is it not?

I think I am just going to have to make an ActiveX control which automatically checks the users 'Print background colors and images' button.

~ Mark

mattur

7:28 pm on Sep 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ah, sorry Mark, suffering some brain fatigue today. Note to self: read the original post rather than skim it in future :)

I think you're right. The only other option is to dynamically generate an image on the server. Or change everyone's settings as you say.

Marshall

11:50 pm on Sep 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



But I need the text to be White.

Why?

Are you not also forgetting those who are visually impaired by doing this?

Marshall