pdfGenerate
Description
Generates a PDF.
Input / Parameter
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
Output
N/A
Callback?
callback
The function to be executed if the PDF is generated successfully.
errorCallback
The function to be executed if the PDF is not generated successfully.
Video
Coming Soon.
Example
In this example, we will generate a PDF from HTML and return the PDF file to the user.
Steps
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 thepdfGenerate
function first. We add asetComponentValue
to the flow, for when pdfGenerate returnstrue
.For pdfGenerate function, open the inspector and add the following parameters:
type
html
value
<html><body style="font-size:120%">This is the pdf content</body></html>
result
share
For setComponentValue function, set the component to the label lblResult we created in step 2.
Result
When the user clicks on the button, it will generate a PDF with the text "This is the pdf content".
Links
Last updated