Skip to content

T3 Labels : Generating Label PDFs

Matt Frisbie edited this page Jul 28, 2025 · 6 revisions

Introduction

T3 label PDFs are generated using several different sources that control how the labels will appear:

Templates
Layouts
Data List
Default Data
Built-In Data
Images
Settings


Templates

A template defines the overall layout and physical structure of the label, including its dimensions, margins, padding, and page arrangement such as rows, columns, and spacing.

Learn more about label templates


Layouts

Layouts control what will be printed on each label and how it is arranged. When you are configuring a label, this is where most of the effort will be dedicated.

Learn more about layouts and layout elements


Data List

The data list controls how many unique labels are generated, and what data is inserted into each label.

Each item in the data list represents one label. If you wanted to print a set of 5 labels that didn't need any special data into each, you would just create an empty list of length 5:

[
  {},
  {},
  {},
  {},
  {}
]

If you wanted to insert two values, say firstName and lastName into each label, you could specify that as follows:

[
  {
    "firstName": "Mike",
    "lastName": "Smith"
  },
  {
    "firstName": "Jane",
    "lastName": "Jones"
  }
]

Package data returned from the T3 APi is structured as follows:

[
  {
    "package": {
      "hostname": "ca.metrc.com",
      "label": "1A4400001234000000005678",
      "item": {
        "name": "Bubba Kush",
        ...
      },
      "isInTransit": false,
      "isOnHold": false,
      "isOnRecall": false,
      ...
    }
  },
  {
    "package": {
      "hostname": "ca.metrc.com",
      "label": "1A4400001234000000005679",
      "item": {
        "name": "1g Wedding Cake Preroll - 5pk",
        ...
      },
      "isInTransit": false,
      "isOnHold": false,
      "isOnRecall": false,
      ...
    }
  }
]

How to use add these values to a label is covered in Injecting Values


Default Data

Default data is used in two situations:

  • You want to inject a value into all labels, but dont want it included in the layout. (Example: facility address, shared between layouts)
  • Items in your data list are missing values, and you want to fall back to a specific value

Default data is usually not needed.


Built-In Data

Built-in data is provided by T3 out of the box. It included text and images that are commonly used by all cannabis businesses.

Examples:

  • Warning disclosures
  • Warning images specific to states
  • Generic cannabis images
  • Poison Control Center contact information

Images

Images can be inserted into labels and rendered using an IMAGE layout element.

The following is an example of how image data might be passed:

{
  "logo.png": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO..."
}

This image can now be used as follows in a layout element:

{
  "elementType": "IMAGE",
  "valueTemplate": "{{ images['logo.png'] }}"
}

Settings

Label settings configure how your labels will appear. Settings used most often:

  • How many copies of each label should be printed
  • Reversing the print order
  • Rotating your layout sideways by 90 degrees
  • Enabling/disabling watermark, for trial/error that doesn't count against your monthly quota
  • Enabling/disabling debug, for drawing boundaries around each layout element

Injecting Values

TODO Jinja


Arranging and Styling Text

TODO size, style, positioning, tables

Text

Sidebar

Clone this wiki locally