Here I used Print() of php to print a page but my problem is it is printing everything which contains on the page i.e., (unwanted data) also

And also it is depending on scroll bar to print the page...

<a onClick="window.print();" class="cal_txt_black" style="cursorointer"
<img src="../images/printer.jpg" width="34" height="37" style="margin-right:
450px" />
<br />
<span style="margin-right: 450px;font-size:11px;font-