JavaScript
function printDiv(divP) {
var win = window.open();
win.document.write($(divP).html());
win.print();
}
Here I am printing contents of a Div using Javascript. This code opens a window along with print dialog. How to open only the print dialog without displaying window. Thanks for all.