Try this one:
Add an attribute id to your table your_content
Place an anchor tag :
And add script:
This script will initially show print preview of the content that is inside your table.
$(document).ready(function(){
$('#printPage').click(function(){
var data = '';
data += '
data += $('#your_content').html();
data += '
myWindow=window.open('','','width=200,height=100');
myWindow.innerWidth = screen.width;
myWindow.innerHeight = screen.height;
myWindow.screenX = 0;
myWindow.screenY = 0;
myWindow.document.write(data);
myWindow.focus();
});
});
Copy the script part and put it on the top of your page. And put the print link, [above anchor tag] wherever you want. And make sure you have included the jquery script file.