0

I have this image below:

 <img src="sample.png"></img>

Javascript code:

win = window.open(img.src,"_blank");
win.onload = function() {
    win.print();
}

I want to print the image without opening a window. How will I do that in javascript?

alyssaeliyah
  • 2,214
  • 6
  • 33
  • 80
  • Here is a possible solution... http://stackoverflow.com/questions/2742144/how-to-print-a-image-file-in-printer – Vim Mar 13 '15 at 06:29
  • [CSS Print Stylesheet: hide everything except specific image, show that full-page](http://stackoverflow.com/questions/15416557/css-print-stylesheet-hide-everything-except-specific-image-show-that-full-page), [CSS - Print view - Hide all elements except one div](http://stackoverflow.com/questions/1511745/css-print-view-hide-all-elements-except-one-div) – Andreas Mar 13 '15 at 06:47

0 Answers0