Convert html to pdf
Function: Convert HTML to PDF
This function allows you to transform any HTML content into a PDF document. It's perfect for generating reports, invoices, or any other document that needs to be presented in a standardized, printable format from web-based content.
Input
- HTML: The actual HTML code (as a piece of text) that you want to convert into a PDF.
- Type: STRING
Output
- Output: The generated PDF file. This file will be stored in a variable that you can then use in other parts of your application, for example, to attach to an email or allow users to download. By default, this variable will be named
PDF_FILE, but you can choose a different name.- Type: FILE
Execution Flow
Real-Life Examples
Here are some practical ways you can use the "Convert HTML to PDF" function:
-
Generate a Simple Web Page as a PDF:
- Inputs:
- HTML:
<h1>Welcome to My Site!</h1><p>This is a simple page converted to PDF.</p>
- HTML:
- Result: A PDF file named
PDF_FILEis created, containing the "Welcome to My Site!" heading and the paragraph text. You can then offer this PDF for download.
- Inputs:
-
Create a Dynamic Invoice for a Customer:
- Inputs:
- HTML: (A variable containing HTML code for an invoice, which has been dynamically populated with customer details and order items from your database)
- Output Variable Name:
CustomerInvoice
- Result: A PDF file named
CustomerInvoiceis generated, showing the complete invoice for a specific customer. This PDF can then be automatically emailed to the customer.
- Inputs:
-
Produce a Monthly Sales Report:
- Inputs:
- HTML: (A variable holding the HTML structure of a sales report, filled with data like sales figures, product lists, and charts generated from your application's data)
- Output Variable Name:
MonthlySalesReport
- Result: A PDF file named
MonthlySalesReportis created, containing all the detailed sales information. This PDF can be saved to a cloud storage service or sent to stakeholders.
- Inputs: