PDF Generator
HomeBlogDocsContact
  • Overview
    • Try It!
    • Introduction
    • Key Features
    • Industry Use Cases
      • PDF Generator for Human Resources
    • Videos
  • Technical Docs
    • Getting Started
    • Building a PDF Template
      • HTML to PDF Merge Templates
      • Printable Labels
        • Label Templates
        • Label Configuration
        • Adding New Avery Type Label Configuration
        • Printing Labels
      • Merge Keys
      • Data Sources
    • Generating a PDF Document
      • Create from Wizard
      • Create from Flow Action
      • Create from Script
    • The Generate PDF Wizard
      • PDF Wizard (Standard Forms)
      • PDF Wizard (Workspaces)
      • PDF Wizard (List View)
    • Adding QR / Barcodes to PDFs
      • How-to Create Barcode Labels
    • TinyMCE Configs
    • Logging
    • Troubleshooting
    • Frequently Asked Questions
Powered by GitBook
On this page
  • Source Record Attribute
  • Static
  • HTML
  • QR/Barcode
  • Pre-Defined
  • Scripted
  1. Technical Docs
  2. Building a PDF Template

Merge Keys

PreviousPrinting LabelsNextData Sources

Last updated 9 months ago

PDF Template Merge Keys are individual components used to include dynamic or programmatic data into your PDF - they are generally child records of your or .

Merge Keys are referenced in the parent PDF Template by placing the 'Merge key' value in ${handlebar} brackets.

For example, if you have a Merge Key with a 'Merge key' value of 'FIRST_NAME', you can insert it into your PDF Template by adding ${FIRST_NAME} to the 'HTML template' field of your PDF Template.

In most cases, you will create new PDF Template Merge Key records from the Related List on the HTML to PDF Merge Template or Label Template form. This ensures they are properly linked to the parent Template.

Depending on the type of PDF Template Merge Key you create, you will find different options on the form.

Source Record Attribute

  • Source table: Table from which to derive the record attribute. (Note: This is pre-set to the 'Source table' on your parent Template and cannot be changed. If you need to reference a different table, use a 'Scripted' Merge Key.)

  • Source field: The field from which to derive the record attribute. Depending on the field type, you may choose a Value type specific to that field, such as Value, Display Value, Currency String, etc.

Static

  • Static text: Static text to display. This type of Merge Key can be useful when reusing a static piece of text in multiple PDF locations, but you wish to edit it in a single location.

HTML

  • HTML text: Similar to 'Static', but with rich-text capabilities.

QR/Barcode

When using a barcode label within a PDF Template, we recommend creating a Barcode Generator with a single Barcode Part that is the barcode or QR code component, and then using PDF Generator to add any additional content.

Pre-Defined

  • Pre Defined Map: Merge Map records can be predefined via the Yansa PDF Generator -> Merge Maps -> Pre-Defined Merge Maps module in the left nav. This can be useful to create a Merge Map once and then reuse it in multiple PDF Templates. Pre-Defined Maps can be of any type: Source Record Attribute, Static, HTML, QR/Barcode, or Scripted.

Scripted

  • Script: Server-side script allowing you to return any custom content you desire. The source table record ('current') is available. This can be useful to reference dynamic data that is related to the source table record, but unavailable on the source table record itself. This can also be useful to include dynamic data such as date/time content that needs to be generated at the time the PDF is created.

Barcode generator: When app is installed on the same instance, this option is available to embed a Barcode Label into your PDF.

Yansa's Barcode & QR Code Generator
HTML to PDF Merge Template
Label Template
PDF Template Merge Keys Related List
Source Record Attribute
Static
HTML
QR/Barcode
Pre-Defined
Scripted