This module contains actions for creating a PDF client-side on a mobile device, even when off-line, based on screen content. It uses the jsPDF library to create the PDF file, but the parsing of the HTML was created by the author.
Note that the parsing is fairly rudimentary: from the specified container (div), the DOM is traversed and child <div>s, <img>s (PNG and JPG only), <br>s and text is processed and output to the PDF, taking into account foreground and background colours and borders (if present). HTML tables are not supported, so layout your page with containers (divs). Font support is also flaky, only standard PDF fonts are supported.
Since the DOM does not provide information on text wrapping, the script guestimates it, which sometimes results into wrong wrapping and/or container overflow. In these cases, it's best to experiment with slightly larger padding or margin. Also, always put text in its own container (as opposed to putting other elements in the same container as well), as positioning goes wrong in this case (not much I can do about that).
Elements with class "NoPdf" will be skipped—they won't be included in the PDF, nor will they be traversed (so child elements will also not appear in the output). A single element (typically a div) on the page can have class "PdfFooter". This element will then be positioned on the bottom of the page, even if not displayed as such on the screen.
Updates: