I have this function for the print button:
<script src="js/jquery.PrintArea.js"></script>
<script>
$(document).ready(function(){
$("#printButton").click(function(){
var mode = 'iframe'; //popup
var close = mode == "popup";
var options = { mode : mode, popClose : close};
$("div.printableArea").printArea( options );
});
});
</script>
<a href="javascript:void(0);" id="printButton">Imprimir</a>
<div class="printableArea">
aqui lo que voy a imprimir
</div>
but I printed the link of the page as I do to remove the link at the top of the page and at the bottom of the page delete the number of pages