The HTML to PDF Data Operation The HTML to PDF Data Operation

The HTML to PDF Data Operation

Elliot Fiske Elliot Fiske

Overview

The HTML to PDF Data Operation converts an HTML Text value to a PDF. This can be used to easily create PDF forms that the customer can print, or to tie in with an existing workflow that uses a PDF.

html-to-pdf.gif

Use Cases

  • Generate a form that the customer can download and print out for use with an existing workflow.
  • Generate a receipt for a customer.
  • Generate an invoice for a customer.

Data Operation Properties

HTML

A Text value containing the HTML that will be rendered to a PDF. This can include CSS <style> tags, but cannot contain any Javascript.

PDF Filename

The filename of the created PDF.

Footer Height

Determines how much space will be added to the bottom of each page of the PDF. Requires a CSS property like "100px".

Header Height

Determines how much space will be added to the top of each page of the PDF. Requires a CSS property like "100px".

Asset Setting

Scope

Determines the scope of the download link. This can either be APP or SESSION. If the generated PDF should be accessible from other user sessions, choose APP. Otherwise, if the created PDF is unique per customer, choose SESSION.

Visibility

Determines the visibility of the download link. This can either be GLOBAL or PRIVATE. If the generated PDF has sensitive customer information, it should be marked as PRIVATE. With PRIVATE, the PDF will have an extra layer of access protection. The generated URL will have the necessary credentials to access the file.

NOTE: The generated URL for the PDF allows anyone to access the file. The URL should only be shown to the customer that the PDF belongs to.

Download Url Expiration

Determines how long the download link to the PDF is available. For instance, if 30 Days is selected, the download link will no longer work after 30 days. Note that if the PDF is marked as PRIVATE, the link has a maximum expiration length of 7 days.

If this field is left blank, the download link will never expire.

Run Results

A Variable is automatically created to hold the results of this Operation. This result will be an object with several keys that describe the generated PDF.

The most important of these keys is downloadUrl, which is a URL that downloads the generated PDF when accessed.

Further Reading

To learn how to integrate your PDF workflow with Airkit, read Working with existing PDFs.

To make a form with a PDF through Airkit, use The Fill PDF Form Data Operation.

For more information on working with files and media, read Working with Files & Media.

Add comment

Article is closed for comments.