Click here to Skip to main content
15,882,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to print a webpage.But i also want to print my logo only on webpage during printing but that logo is not present on original webpage .It is dynamically generated on printing webpage.How can i do this?
Posted

Using technique of having two different CSS for webpage. One for website viewing in browser and other for printing. A read on it here[^].

Keep image on website but set the style display property to hidden.

Have a different style property for Printing and there keep the display propert value as 'none' and thus the image should be visible there.
 
Share this answer
 
Comments
Ankur\m/ 2-Feb-11 5:22am    
Last line - display property value as 'none'. I think it should be 'block'.
ahsan sarfraz 2-Feb-11 5:22am    
nice link.
Espen Harlinn 6-Feb-11 11:55am    
Good answer, it's what makes CSS really useful, my 5
another way is to place the logo on your page with display:none property .

and then using javascript create a new window. write the contents of the body of original page to that window and set the property of Logo (image) to display:block. then print the new instance of the window object you just created.
hope it will help.
regards
Ahsan Sarfraz
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900