473,387 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to print document without transparent font color?

I want user to be able to click print button and it will print document in web page.
I try to use
Expand|Select|Wrap|Line Numbers
  1. window.print(); 
but it prints everything including transparent font color. I want to print document without printing transparent object. How can I do this??
Oct 19 '10 #1
2 2029
Frinavale
9,735 Expert Mod 8TB
You should create a cascading style sheet (CSS) that is responsible for styling the page when it is printed.

You currently have CSS that is creating blue background etc for elements on the page. The CSS you implement for printing media will style the elements differently so that the page is more printer-friendly (eg: sets the background to nothing or removes colours from elements...it may even re-size things so that it fits the page).

This has more information on CSS media types:CSS media types. I think that it will help you to understand what you need to do to accomplish what you are looking for.

-Frinny
Oct 22 '10 #2
Is it involve about CSS? even if I do not have css. It still print white font.
<html>
<body>
<Font color="white">kdkdk
</body>
</html>
Oct 26 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: L Santi | last post by:
Hi all, I use XSL-FO to transform a document from XML to PDF. I have a question for you! Is it possibile to setup a XSL template to apply a font color on the fly? For example: <customer>
6
by: Matt Adams | last post by:
I want define for a couple of words inside a longer text with different font specifications. I declared it like: ....text before.... <FONT class=aaa> these text should get other attributes...
0
by: Marco Martin | last post by:
Hi, I have a control that prints itself. The control has a method Control.Print(strdocName, printEnum.FitToPageWidth). I need to have better control on how it prints itself. I'm assuming that...
7
by: Ed West | last post by:
Hello, I have a simple form with some input boxes. After validation if one fails, then I would like to at the top of the page say something like "The following fields in red are required" and...
7
by: beetdocta | last post by:
hello i was wondering is it possible in visual basic .net to change the color of certain words or phrases without changing the color of all the text in the lable or without having to create a new...
2
by: Sam | last post by:
Hello all, I have a page consisting of PHP code, html and with a small amount of Javascript. I'm trying to display a number of images like this: document.write('<a href="'+LinkText+'">');...
5
by: mistral | last post by:
Simple question: how better set font color in script? <script type="text/javascript"> <!-- //Secify scroller contents var line=new Array() line="Typewriter script" line="It brings up the...
0
by: thirunavukarasukm | last post by:
Hai.... To print Html page using PrintDialog and Print Document i am created one windows appication.. the windows application have many pages in my booking page i have two buttons one...
2
by: piercy | last post by:
The project im working on requires the user to be able to print reports based on information the program gathers. (ie.To, From, Cost, Username etc.etc.). Now to make this report thing more usable...
3
by: shatterah | last post by:
I am attempting to actively add multiple lines of text to the bottom of the page based on if conditions. However I am having trouble with breaking each message into its own line, making the text red...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...

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.