Tables
Tables allow you to display multiple related records in your PDF documents. They're perfect for line items, contact lists, order details, and any repeating data.
Overview
Tables in our platform are dynamic — they automatically expand based on the number of related records. A single template row becomes multiple rows in the generated PDF.
Creating a Table
Step 1: Add a Table Element
- In the template designer, select the Table tool
- Draw the table area on your canvas
- Define the number of columns you need
Step 2: Configure Headers
Set up your table headers:
- Click on the header row
- Enter the column titles
- Style the headers (font, size, background color)
Example Headers:
| Product | Quantity | Unit Price | Total |
|---|
Step 3: Add Merge Fields to Data Row
In the data row (below headers), add merge fields for each column:
| Column | Merge Field |
|---|---|
| Product | {{LineItems.ProductName}} |
| Quantity | {{LineItems.Quantity}} |
| Unit Price | {{LineItems.UnitPrice}} |
| Total | {{LineItems.TotalPrice}} |
Step 4: Configure Table Properties
Adjust table settings:
- Row height: Set the height for data rows
- Header height: Set the height for header row
- Repeat headers: Enable to show headers on continuation pages
- Border style: Configure cell borders
Table Merge Field Syntax
Tables use child relationship fields with dot notation:
{{RelationshipName.FieldName}}
Salesforce Examples
Opportunity Line Items:
{{OpportunityLineItems.Name}}
{{OpportunityLineItems.Quantity}}
{{OpportunityLineItems.UnitPrice}}
{{OpportunityLineItems.TotalPrice}}
{{OpportunityLineItems.ProductCode}}
Account Contacts:
{{Contacts.Name}}
{{Contacts.Email}}
{{Contacts.Phone}}
{{Contacts.Title}}
Case Comments:
{{CaseComments.CommentBody}}
{{CaseComments.CreatedDate}}
{{CaseComments.CreatedBy.Name}}
HubSpot Examples
Deal Line Items:
{{line_items.name}}
{{line_items.quantity}}
{{line_items.price}}
{{line_items.amount}}
{{line_items.discount}}
Company Contacts:
{{contacts.firstname}}
{{contacts.lastname}}
{{contacts.email}}
Table Features
Dynamic Row Expansion
Tables automatically expand based on your data:
Template (1 data row):
| Product | Qty | Price |
|---|---|---|
{{LineItems.Name}} | {{LineItems.Quantity}} | {{LineItems.Price}} |
Generated PDF (3 line items):
| Product | Qty | Price |
|---|---|---|
| Widget A | 5 | $10.00 |
| Widget B | 3 | $25.00 |
| Widget C | 10 | $5.00 |
Repeating Headers
When tables span multiple pages, headers repeat automatically:
- Enable Repeat headers on new pages in table properties
- Headers will appear at the top of each page
- Maintains readability for long tables
Automatic Page Breaks
The system handles page overflow intelligently:
- Rows that don't fit are moved to the next page
- Headers repeat on new pages (if enabled)
- Elements below the table automatically reposition
Content Below Tables
Elements positioned below a table will automatically move down as the table expands:
Example:
- Table at position Y: 100
- "Total" text at position Y: 200
- If table expands by 150 units, "Total" moves to Y: 350
Styling Tables
Column Widths
Set individual column widths:
- Select the column
- Enter width in millimeters or percentage
- Ensure total width fits your page
Cell Alignment
Configure text alignment per column:
- Left: Text-based content
- Center: Short values, headers
- Right: Numbers, currency
Borders
Customize cell borders:
- Border color
- Border width
- Show/hide individual borders (top, bottom, left, right)
Row Colors
Apply alternating row colors for readability:
- Header background color
- Data row background color
- Alternate row color (optional)
Cell Padding
Add space within cells:
- Top/bottom padding
- Left/right padding
- Consistent padding improves readability
Common Table Use Cases
Invoice Line Items
| Item Description | Quantity | Unit Price | Total |
|---|---|---|---|
{{LineItems.Description}} | {{LineItems.Quantity}} | {{LineItems.UnitPrice}} | {{LineItems.TotalPrice}} |
With totals section below:
Subtotal: {{Amount}}
Tax: {{Tax}}
Total: {{TotalAmount}}
Contact Directory
| Name | Title | Phone | |
|---|---|---|---|
{{Contacts.Name}} | {{Contacts.Title}} | {{Contacts.Email}} | {{Contacts.Phone}} |
Order History
| Order # | Date | Status | Amount |
|---|---|---|---|
{{Orders.OrderNumber}} | {{Orders.OrderDate}} | {{Orders.Status}} | {{Orders.TotalAmount}} |
Project Tasks
| Task | Assignee | Due Date | Status |
|---|---|---|---|
{{Tasks.Subject}} | {{Tasks.Owner.Name}} | {{Tasks.ActivityDate}} | {{Tasks.Status}} |
Advanced Table Features
Calculated Fields
If your CRM supports formula fields, use them in tables:
{{LineItems.CalculatedDiscount}}
{{LineItems.ExtendedPrice}}
Nested Relationships
Access related data within table rows (where supported):
{{LineItems.Product.Category}}
{{LineItems.Product.Description}}
Empty Tables
When no related records exist:
- Table shows header row only
- Or displays a "No items" message (configurable)
Best Practices
1. Plan Your Columns
Before creating a table:
- List all fields you need to display
- Determine appropriate column widths
- Consider which columns are essential vs. optional
2. Optimize Column Widths
- Allocate more width to text-heavy columns
- Numbers and dates need less space
- Test with longest expected values
3. Use Appropriate Alignment
| Content Type | Alignment |
|---|---|
| Text | Left |
| Numbers | Right |
| Currency | Right |
| Dates | Center or Left |
| Short codes | Center |
4. Enable Header Repetition
Always enable header repetition for tables that might span pages:
- Improves readability
- Professional appearance
- Essential for long tables
5. Test with Various Data
Generate test PDFs with:
- Single row
- Many rows (to test pagination)
- No rows (to test empty state)
- Long text values (to test wrapping)
6. Consider Mobile/Print
- Avoid too many columns
- Ensure text is readable when printed
- Test at actual print size
Troubleshooting
Table Not Expanding
Symptoms: Only one row appears despite multiple records
Solutions:
- Verify the relationship name is correct
- Check that related records exist
- Ensure the relationship is a child relationship (not lookup)
- Confirm your integration has access to related records
Wrong Relationship Data
Symptoms: Table shows data from unexpected records
Solutions:
- Verify the relationship API name
- Check for similarly named relationships
- Confirm the relationship direction (child, not parent)
Page Break Issues
Symptoms: Table splits awkwardly between pages
Solutions:
- Adjust row heights
- Enable header repetition
- Consider splitting large tables
- Adjust page margins
Alignment Problems
Symptoms: Text doesn't align properly in cells
Solutions:
- Check cell alignment settings
- Verify column widths are adequate
- Review cell padding settings
- Test with sample data
Missing Values in Cells
Symptoms: Some cells are empty when data exists
Solutions:
- Verify field names are correct
- Check field-level security in CRM
- Ensure fields have values in source records
- Review relationship field access
Limitations
Current Limitations
- Nested tables: Tables within tables are not supported
- Merged cells: Cell merging is not available
- Complex formulas: Calculations must be done in source system
- Sorting: Records appear in source system order
Data Source Considerations
Salesforce:
- Child relationship limits apply
- SOQL query limits may affect large datasets
- Field-level security affects visible data
HubSpot:
- Association limits may apply
- Some associations require additional API calls
SQL/Google Sheets:
- Limited table support (single-level relationships)
- Consider data structure requirements
Next Steps
- Merge Fields - Learn merge field syntax
- Templates - Position tables in templates
- Integrations - Understand data source requirements
