HTML to PDF
Discover more about the HTML to PDF component and how to use it on the Digibee Integration Platform.
HTML to PDF allows the creation of files in PDF format from a HTML. The component uses Apache FreeMaker templates to generate the HTML through the pipeline JSON message.
Parameters
Take a look at the configuration options for the component. Parameters supported by Double Braces expressions are marked with (DB)
.
File Name (DB)
Name of the PDF file to be generated in the output of the component execution.
file.pdf
String
Template (HTML) (DB)
HTML template to be interpreted to generate the PDF file. This field supports the FreeMarker template.
N/A
String
Fail On Error
If the option is activated, the execution of the pipeline with an error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.
False
Boolean
Secured PDF
If the option is activated, the insertion of a password in the PDF file is allowed to generate a protected document.
False
Boolean
Password (DB)
Password to protect the PDF file.
N/A
String
Custom permissions
If the option is activated, custom permission options for the PDF file become available; otherwise, none of the following parameters will be available, and the PDF file will be generated with all the permissions.
False
Boolean
Read only
Access permission that defines the PDF file as "read-only". If the option is activated, all other access permissions will be deactivated.
False
Boolean
Assemble document
Allows pages to be added, rotated, or deleted from the file.
False
Boolean
Modify
Allows the file to be modified.
False
Boolean
Modify annotations
Allows text notes to be added or modified in the file.
False
Boolean
Extract content
Allows texts and images to be extracted from the file.
False
Boolean
Extract for accessibility
Allows texts and images to be extracted from the file for accessibility matters.
False
Boolean
Allows the file to be printed.
False
Boolean
Print degraded
Allows the file to have degraded printing.
False
Boolean
Fill in Form
Allows forms to be filled with interactive fields.
False
Boolean
Messages flow
Input
The component accepts any input message, being able to use it through Double Braces.
Output
Successful
Unsuccessful
Example of request response with error
success:
“false”
when the operation fails.message: message about the error.
exception: information about the occurred error.
Example:
Body
Therefore, in the input message an object array is received and it has the properties “name”
and “price”
:
The template will make the iteration in this received array and fill the HTML:
Other applications
SVG
To use the SVG as HTML tag, apply the following property inside the SVG tag xmlns="
http://www.w3.org/2000/svg
"
:
CSS
Versions after 2.1 aren't supported.
Images
The use of images in base64 format inside HTML tags isn't supported.
Example:
<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAA…>
You can use images with local and remote reference:
Local Image
In the example above, there must be a image file with the exact same name specified inside the src tag (image.jpg)
Remote Image
Last updated