I have a lightbox plugin that required additional option - print the image. So I did a little JS function that print that image as follow:
var headstr="<!DOCUMENT html><html xmlns='http://www.w3.org/1999/xhtml'><head><title></title></head><body>";
var footstr="</body>";
var newstr="<img src=\"[img-location]\" alt='courses' />";
document.body.innerHTML=headstr+newstr+footstr;
window.print();
window.location.reload();
The problem is that when the user press on the print button, in chrome it opens a new window (chrome print page) and in it, it says - print preview failed. In firefox and IE8 it works just fine...