Without rendering the HTML first, just print the HTML without opening a new tab, is that possible? Below is my existing code that works printing in a new tab:
var w = window.open();
var html = $(data).html();
$(w.document.body).html(html);
w.print();