Login to follow
HTML 2 PDF

HTML 2 PDF (ODC)

Stable version 1.0.0 (Compatible with ODC)
Uploaded on 18 Jul by OutSystems Champions
HTML 2 PDF

HTML 2 PDF (ODC)

Documentation
1.0.0
Configuration

Generates a PDF from an HTML string using [`html2pdf.js`](https://github.com/eKoopmans/html2pdf.js) — all in the browser (no server needed).
1. Add the Web block PDF JS Library with page to support by library to the below client action for pdf generation
2. Add the client action PDF from the Library to generate of pdf

Parameter


Type


Default


Example


Description


htmlStringstringRequired

Hello

The raw HTML string to render into a PDF.
options.FileNamestring"Document.pdf""Invoice.pdf"Output filename for the generated PDF.
options.Marginnumber | string | array1010 or "10,15,10,15"Margin (single value or [top,left,bottom,right]).
options.Orientationstring"portrait""landscape"Page orientation. Values: "portrait" or "landscape".
options.Formatstring"a4""letter"Page size. Supported: a4, letter, etc.
options.Unitstring"mm""pt", "in", "px"Measurement unit.
options.Scalenumber21.5, 3html2canvas scale for better quality (higher = sharper, larger PDF).
options.Errorstring (output)""N/ACaptures error message if generation fails (used for output).

License & Usage html2pdf.js
Library: html2pdf.js
License: MIT License
✅ Free for: Personal projects, Commercial use, Closed-source or open-source applications