Q:

javascript:window.print() prints 2 pages while I have 1

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...

A:

You can use CSS for controlling the image size, etc for print - using @media print
Give the image a max-width.  
That way, you can control how the image renders on the page.  Example: 
@media print { 
    body img {
       width: 90%; max-width: 1048px; 
    } 
}

