I have a simple HTML document which includes an image tag only. I want to print the image after document's loaded. my code:
<body>
<img id="form1" src="form1.jpg" alt="form1" style="margin: 0 auto;display:block;" onLoad="javascript:window.print()" />
</body>
it works but the problem is that it prints both the image ( webpage ) and another paper which is empty and only has a text on top which is giving the address of image and html title. how can I prevent from printing the extra paper ?
P.S : I used jquery plugins like PrintElement.js, jqPrint.js, etc, but they have same problem...