title: Javascript - Programmatically batch print HTML documents
body: <p>tl;dr I'm looking for a good way of batch printing database-stored HTML documents from javascript</p>
  
  <p>Our users generate rich text content via an open source WYSIWYG javascript-based text editor (CKEditor). The HTML content is saved to our database and can be printed directly from the editor via its inbuilt print functionality (basically just window.print()) . This is great and works perfectly. </p>
  
  <p>Now, we have a need to batch print saved documents and I am looking for workable solutions. There are various options that I can see, but all have large tradeoffs:</p>
  
  <ol>
  <li><p>User selects documents to print. JS code loops through documents and calls print one-by-one. The issue here is that the user will see a bunch of print dialogs. Which is painful. (Aside: we are using Chrome but I do not have the option of setting it to kiosk mode)</p></li>
  <li><p>User selects documents to print. JS code combines all of these in a single (hidden) container and they are all printed as one 'document'. These can be fairly big documents with tables, images, etc. I worry about the performance involved here as we could be adding a <em>significant</em> amount to the DOM.</p></li>
  <li><p>Similar to #2 above, but at some point the documents are converted and saved to a single PDF. This would be OK, but there don't seem to be many good/cost-effective options for converting HTML to PDF.</p></li>
  <li><p>Generate some kind of a report that can handle HTML content. I took a look at SQL Server reporting services but it supports a very limited set of HTML tags and CSS properties.</p></li>
  </ol>
  
  <p>Is there a better way to batch print HTML content from javascript? Any help is very much appreciated!</p>
  
  <p><strong>Edit</strong> As per @Paul, I need to clarify a few points:</p>
  
  <p>The content is that which is created in your standard online text editor. In my case:</p>
  
  <ul>
  <li>No iframes</li>
  <li>No animations</li>
  <li>No dynamic content</li>
  </ul>
  
  <p>Now, were I to print straight from the editor a print stylesheet would be applied, so this may complicate things a bit.</p>