title: window.print image in a link
body: <p>So I have this: </p>
  
  <pre><code>&lt;script&gt;
     window.print();
  &lt;/script&gt;
  </code></pre>
  
  <p>I want to print this url's image: </p>
  
  <pre><code>http://www.somefancyurl.com/labels/postage/45029dd.png
  </code></pre>
  
  <p>The page displays nothing but the image I am wanting to print. </p>
  
  <p>I tried: </p>
  
  <pre><code>&lt;script&gt;
     window.print('http://www.somefancyurl.com/labels/postage/45029dd.png');
  &lt;/script&gt;
  </code></pre>
  
  <p>But that didn't seem to change anything. </p>
  
  <p>Thanks to some searching, I came up with this: </p>
  
  <pre><code>function printLabel(){
  
     popup = window.open();
     popup.document.write('&lt;?php echo $order-&gt;shipmentLabel; ?&gt;');
     popup.print();
  
     return false;
  }
  </code></pre>
  
  <p>But that tries to print out <code>&lt;?php echo $order-&gt;shipmentLabel; ?&gt;</code> not the actual image.</p>