Discussion Locked

Transparent HTML text

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Dear All:

Is there a way to make text on an HTML-based Web page transparent to a Printer! The text is transparent on the screen, but the printer (both HP LaserJet 4 and Tektronix 740 Phaser) see the text as still being there and needing to be printed. If it's just a tag I need to put in, please let me know.

Thanks in advance for your help.

5 replies

by ebob

"Transparent"? In general, I have seen this done by making the text the same colour as the background. And yes, this works fine on the screen (most of the time - depending on whether the user has seriously messed around with the browser settings).
And that's where the problem with printing comes in. Depending on those browser settings, text the same colour as the background might print as "blank". Also, white text might print as "blank", if the user has turned off printing backgrounds.

Ifyou want to include the text for purposes of being indexed, consider including the text in a tag in the section.

by peter ritchie

There are a couple of ways this could be approached with Interent Explorer. If you're familiar with Internet Explorer you may have noticed that by default it does not print background colours and images. One way to make text that does not show up on the printer is the make the text white on a coloured background. The background would then not be printed and the text would then have no contrast to the page and disappear.

The other option is to use the onbeforeprint and onafterprint events to hide/show elements that don't need to be printed. More detailed information and examples can be found at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnscrpt/html/DHTMLPRINT.asp

There were also some IE specific tags that let you define what was specifically for the printer. But, as I recall, they weren't very reliable.

This discussion is closed to new replies.