This snippet in JQuery
prints also dynamic images rendered inside the html.
Colombo was great..
$(function(){
$('body').on('click','button#printreceipt',function(e){
e.preventDefault();
e.stopPropagation();
var printWindow = window.open('');
var divContents = $("#receipt").html() +
"