views:

193

answers:

3

I have tried javascript window.print() It prints the full page content including the print button on the page.

thanks in advance for any solution and help

+3  A: 

You require to create new style sheet print.css and set CSS media=print

for example :

<style media="screen">
  .noPrint{ display: block; }
  .yesPrint{ display: block !important; }
</style>

<style media="print">
  .noPrint{ display: none; }
  .yesPrint{ display: block !important; }
</style>

for more detatil : http://www.codeproject.com/KB/HTML/Printing_with_CSS.aspx

Pranay Rana
Hey thanks pranay ..!!! it worked :)
Parag Redkar
A: 

A List Apart has a very good article about this.

nico
Thanks nico for the article ..
Parag Redkar
A: 

Create an iframe and copy your text into it. then you can call the print-function of this, in the iframe embedded window

or see: http://michael.josi.de/2009/07/21/string-print/

Michael