Reputation: 4812
I have tried javascript window.print()
It prints the full page content including the print button on the page.
Upvotes: 7
Views: 17954
Reputation: 76
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: String.print()
Upvotes: 2
Reputation: 176956
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 detail : Print a doument with CSS
Upvotes: 19