-
Notifications
You must be signed in to change notification settings - Fork 0
T3 Labels : Generating Label PDFs
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
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 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
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 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 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 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'] }}"
}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
TODO Jinja
TODO size, style, positioning, tables
Text
Created by Matt Frisbie
Contact: matt@trackandtracetools
Copyright © 2025 Track & Trace Tools. All rights reserved.
- Home
- FAQ
- Metrc
- T3 Chrome Extension
- T3 API
- OpenTag
- T3 API : Python Utils
- T3 Labels : Label Templates
- T3 Chrome Extension : Exports
- T3 Chrome Extension : Scan Sheets
- T3 Labels : Tutorial
- RFID
- T3 Chrome Extension : CSV Form Fill
- T3 Labels : Label Layouts
- T3+
- T3 API : Setting Up Python
- T3 Chrome Extension : T3+ Features
- T3 Labels : Printing Label PDFs
- T3 API : API Scripts
- T3 Chrome Extension : Label Studio
- T3 Chrome Extension : Primary Features
- T3 Chrome Extension : Getting Started
- T3 Labels
- T3 Labels : Generating Label PDFs
- T3 API : Reports and Spreadsheet Sync
- T3 API : Getting Started
- T3 Labels : Getting Started