You need to open a popup with javascript and run a function on it print().
var opts = 'width=700,height=500,toolbar=0,menubar=0,location=1,status=1,scrollbars=1,resizable=1,left=0,top=0';
var newWindow = window.open(yourUrl,'name',opts);
newWindow.print();
Please note that the URL you open must be in the same domain as your current page to work.
source
share