Skip to Content (Press Enter)
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Home
Jobs
Ideas
Members
Mentorship
User Groups
Downloads
Platforms
OutSystems.com
My Platform
Community
Resources
Support
Search in OutSystems
Log in
Sign Up
Community
›
Forge
›
Assets list
›
HTML 2 PDF
Login to follow
HTML 2 PDF (ODC)
Stable versionÂ
1.0.0
 (Compatible with
 ODC
)
Uploaded onÂ
18 Jul
 byÂ
OutSystems Champions
Overview
Documentation
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
htmlString
string
Required
Hello
The raw HTML string to render into a PDF.
options.FileName
string
"Document.pdf"
"Invoice.pdf"
Output filename for the generated PDF.
options.Margin
number | string | array
10
10 or "10,15,10,15"
Margin (single value or [top,left,bottom,right]).
options.Orientation
string
"portrait"
"landscape"
Page orientation. Values: "portrait" or "landscape".
options.Format
string
"a4"
"letter"
Page size. Supported: a4, letter, etc.
options.Unit
string
"mm"
"pt", "in", "px"
Measurement unit.
options.Scale
number
2
1.5, 3
html2canvas scale for better quality (higher = sharper, larger PDF).
options.Error
string (output)
""
N/A
Captures 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
Loading
 Loading...