Automation Action: Save As PDF
Save the incoming message or any HTML file or URL as a PDF document.
Renders the incoming message or HTML file or URL as a PDF document.
From the Render list, select:
Render Incoming Message
To render in the incoming message. This will render the incoming message as it would appear in a web browser - including all images.
Render HTML File Or URL
To render any HTML file or web page. Enter the file path or full URL to the web page you want to save as a PDF.
Select the Page Size, Orientation & Margin.
You can also enter an open Password. Users opening the PDF must enter this password before they can view the content.
Enter the File Name and select the Save To folder. You can use %variable% replacements in the file name. A '.pdf' extension will be added if required.
If Ensure Unique File Name is enabled then ThinkAutomation will add a timestamp to the file name to ensure it is unique within the Save To folder.
If Delete File After Message Is Processed is enabled then ThinkAutomation will remove the file when the Automation completes for the current message. This is useful if you wish to use the document in the Automation (for example, to send the document as an attachment with the Send Email action, or to use the html file as the body of an outgoing email), but do not need to keep a local copy afterwards.
If Generate Table Of Contents Using H1-H6 Tags option is enabled then a table of contents will be generated using HTML heading tags (H1-H6) and inserted into the start of the document.
Enable the Print Created Document option if you want ThinkAutomation to print the PDF file after it is created. You can select the Printer to use.
You can assign the full save path & file name to a ThinkAutomation variable to use on subsequent actions (for example, if you wanted to attach the file to an outgoing message). Select from the Assign To list.
You can also add Header & Footer. The header/footer text can be HTML or Markdown. This will be rendered at the top & bottom of the page. ed in addition to %variable% replacements. You can also enter the Header/Footer Height in pixels.
The page breaks in the generated PDF document can be controlled using the following CSS properties:
- page-break-before: always style forces a page break in the PDF before the element.
- page-break-after: always style forces a page break after the element.
- page-break-inside: avoid style will ensure a page break does not occur inside the element if possible.