Client-side HTML to PDF

Stable Version 1.0.1 (OutSystems 11)
Published on 19 Sep (4 weeks ago) by 
Created on 19 Sep (4 weeks ago)
Details
Generates a PDF client-side from HTML.
Read More

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.

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.

What’s new (1.0.1)

Added example module.

Reviews (1)
20 Sep (4 weeks ago)
in version 1.0.1
Good to see this component is ready for the Forge now!
Category
Libraries, Components
Tags
Support Options
This component is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from Kilian Hekhuis who created this component.
Dependencies
See all 1 dependencies
Requirements
Platform:
11.0.0.200
Database:
All
Stack:
.NET
Component Consumers
No consumers yet.
Weekly Downloads