tl; dr I'm looking for a good way to batch print HTML documents stored in a database from javascript
Our users create rich text content through the open source text editor WYSIWYG (CKEditor). The HTML content is stored in our database and can be printed directly from the editor using the built-in print functions (basically, just window.print ()). This is great and works great.
Now we have a need for batch printing of saved documents, and I'm looking for workable solutions. There are various options that I see, but everyone has big tradeoffs:
The user selects documents to print. The JS code cycles through the documents and prints one after another. The problem here is that the user will see a bunch of print dialogs. This is painful. (In addition, we use Chrome, but I have no way to install it in kiosk mode)
The user selects documents to print. JS code combines all of this in one (hidden) container, and they all print as a single "document". These can be quite large documents with tables, images, etc. I am worried about the performance associated with this, as we could add a significant amount to the DOM.
Similar to # 2 above, but at some point, documents are converted and saved to a single PDF file. That would be nice, but there don't seem to be many good / economical options for converting HTML to PDF.
Create some kind of 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.
Is there a better way to batch print HTML content from javascript? Any help is much appreciated!
Change According to @Paul, I need to clarify a few points:
Content is what is created in a standard text editor. In my case:
- Without iframe
- No animations
- No dynamic content
Now, if I were to print directly from the editor, the print stylesheet would be applied, so that might complicate things a bit.
source share