title: Print in the background with javascript i.e. without document pop up
body: <p>Found this code to print from javascript.  But it opens a window with the document to be printed.  Is there a way to hide that document?</p>
  
  <pre><code>var element=document.getElementById(element_id);
  var newWin=window.open('','Print-Window','width=400,height=400,top=100,left=100');
  
  newWin.document.open();
  /* newWin.document.title = "Readings on PageLinks"; */
  newWin.document.write('&lt;html&gt;&lt;head&gt;&lt;title&gt;Readings on PageLinks&lt;/title&gt;&lt;/head&gt;&lt;body   onload="window.print()"&gt;'+element.innerHTML+'&lt;/body&gt;&lt;/html&gt;');
  newWin.document.close();
  
  setTimeout(function(){ newWin.close(); },10);
  </code></pre>
  
  <p>The print is done onload() for that document, so I guess printing could not be done without it.  But can it be hidden?</p>