pdfGenerate
Last updated
Last updated
Generates a PDF.
Name | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
N/A
The function to be executed if the PDF is generated successfully.
The function to be executed if the PDF is not generated successfully.
Coming Soon.
In this example, we will generate a PDF from HTML and return the PDF file to the user.
First we add a button component onto the canvas, and name it btnGeneratePDFFromHTML
.
Then we also add a label named lblResult
which will display the PDF file once it is generated.
We click on the btnGeneratePDFFromHTML
button from step 1 and select "Actions". We add the pdfGenerate
function first. We add a setComponentValue
to the flow, for when pdfGenerate returns true
.
For pdfGenerate function, open the inspector and add the following parameters:
For setComponentValue function, set the component to the label lblResult we created in step 2.
When the user clicks on the button, it will generate a PDF with the text "This is the pdf content".
type
The type of data to use.
String/Text
url
url, html
No
value
The value of the PDF file.
String/Text
-
-
Yes
result
The result of the PDF file.
String/Text
base64
base64, share
Yes
size
The size of the PDF file.
String/Text
A4
A4, A3, A2
Yes
orientation
The orientation of the PDF file.
String/Text
portrait
portrait, landscape
Yes
fileName
The name of the PDF file.
String/Text
-
-
Yes
extra
Extra parameters stored and passed to callback.
Any
-
-
No
type
html
value
<html><body style="font-size:120%">This is the pdf content</body></html>
result
share