Document Generation allows your app users to generate custom PDF documents populated with real-time data. In the initial beta release, you can create a template by uploading a fillable PDF file and then insert the document on any details page.

Adding Document Generation to Your Caspio Apps

Create a Template

  1. Select Templates from the sidebar navigation menu.
  2. Click the Create template button to start uploading your fillable PDF file.
  3. Once the file is successfully uploaded, click Edit to map the template fields.

Note: Templates require upload of a non-password protected PDF file (500MB or less) with at least one fillable field. Template creation is available to Caspio users with “Administrator” permissions, however, any user with DataPage editing permissions can add a template to a DataPage.

Map Template Fields

Next, map the template with an existing table in your account.

  1. Select a table that will be used in the Data source for mapping field or select the Click to map link for any field on the right panel.
  2. Select Click to map to map the PDF field elements. Click Next to continue mapping another field. Once the field is mapped, the field’s color changes to green. To unmap a field, set the value to None.
    In the initial beta release, the following PDF field elements are supported. More field elements and conditional mapping will be added in future releases.
    • Text fields in the Template can be mapped to these table fields:
      • Text (255)
      • Text (64000)
      • Number
      • Integer
      • Currency
      • Date/Time
      • Yes/No
      • Timestamp
      • Random ID
      • Autonumber
      • Prefixed Autonumber
      • GUID
      • Formula
    • Checkbox fields in the Template can be mapped to these table fields:
      • Text (255)
      • Text (64000)
      • Number
      • Integer
      • Yes/No.

Note: A checkbox will be marked on a generated document if a mapped field has value ‘True’ for Yes/No field or value ‘1’ for other field types.

  1. You can also rename the template from the default file name.
  2. Click Save to save the template.

Add Templates to DataPages

In the initial beta release, templates can only be used in details pages and they must be mapped with the same data source as the DataPage. To add a template to a details page:
  1. Go to your details page and select Generate PDF in the DataPage Elements picker.
  2. Configure the options:
    • Label – Instructional text which displays to the left or on top of the PDF generation link
    • Template – The template to be used for PDF generation
    • File Name – The name of the generated PDF file
    • Action – Download or open the PDF file in a new tab
  3. Select Finish to save the DataPage.
Note: The beta release of Document Generation is currently available to trial accounts and Grow plans and higher. For more information, see Caspio plans and pricing.