Containers
Containers are full-width sections that form the structural backbone of your PDF templates. They stack vertically to create organized document layouts with distinct sections.
What Are Containers?
Unlike other elements that can be freely positioned anywhere on the canvas, containers:
- Stack vertically in document flow (one below another)
- Span the full page width (100%, not horizontally resizable)
- Hold other elements inside (text, images, tables)
- Split across pages naturally when content is long
Think of containers as horizontal bands that divide your document into logical sections.
When to Use Containers
Containers are essential for creating structured, professional documents:
| Document Type | Container Sections |
|---|---|
| Invoice | Header, client info, line items, totals, payment terms, footer |
| Report | Title, executive summary, data sections, conclusions |
| Certificate | Header, recipient info, award details, signatures |
| Letter | Letterhead, recipient address, body, signature block |
Adding a Container
- Click Add element in the left panel
- Select Container
- A new container appears at the bottom of your template
- Drag to reorder containers in the Layers panel
Container Properties
Height
The only dimension you can adjust. Drag the bottom edge or set a value in the right panel.
- Default: 200px
- Elements inside are positioned relative to the container’s top-left corner
- Height auto-adjusts during PDF generation based on actual content
Background
Add visual distinction with background colors:
#f5f5f5 Light gray (subtle sections)
#fff3cd Light yellow (warnings, notices)
#e3f2fd Light blue (highlighted content)
transparent No background (default)Border
Define section boundaries:
1px solid #ddd Subtle divider
2px solid #333 Strong separator
1px solid #ffc107 Colored accentBorder Radius
Round the corners for a softer look:
0px Sharp corners (default)
4px Subtle rounding
8px Noticeable roundingPadding
Internal spacing between the container edge and its contents:
- Set uniform padding or individual sides (top, right, bottom, left)
- Keeps content from touching container borders
Margin Top
Vertical spacing between this container and the one above it:
0px Containers touch (default)
10px Small gap
20px Clear separationAdding Elements to Containers
Elements placed inside containers use absolute positioning relative to the container:
- Select the container in the Layers panel
- Add a new element (text, image, or table)
- The element appears inside the selected container
- Drag to position it within the container bounds
Elements can be positioned anywhere within the container using pixel coordinates (left, top).
Container Layout Examples
Invoice Header
Container 1 (height: 100px, background: #f0f0f0)
├── Logo image (left: 20px, top: 20px)
├── Company name text (left: 80px, top: 25px)
└── Invoice number text (right-aligned)Client Information Section
Container 2 (height: 150px, border: 1px solid #ddd)
├── "Bill To" label (left: 0, top: 0)
├── Client name: {{client_name}}
├── Address: {{client_address}}
└── Email: {{client_email}}Highlighted Notice
Container (height: 80px, background: #fff3cd, border: 1px solid #ffc107)
├── Warning icon
└── Important message textPage Breaks and Pagination
Containers handle multi-page documents intelligently:
- Short containers: Stay on one page
- Tall containers: Automatically split across pages
- Container order: Preserved across pages
The PDF engine calculates the actual height needed after your data is injected, so containers with dynamic content (like tables with many rows) expand as needed.
Best Practices
- Use containers for every section - Even simple documents benefit from container organization
- Set appropriate heights - Leave room for dynamic content to expand
- Use backgrounds sparingly - Reserve colored backgrounds for sections that need emphasis
- Consistent margins - Use the same margin-top value between containers for visual rhythm
- Name your containers - Double-click in the Layers panel to rename (e.g., “Header”, “Line Items”, “Footer”)
Containers vs. Header/Footer
| Feature | Containers | Header/Footer |
|---|---|---|
| Position | In document flow | Fixed to page edges |
| Repeats | Once per document | Every page |
| Use for | Main content sections | Page numbers, logos, dates |
Use Header & Footer for content that should repeat on every page.
Next Steps
- Components - Add text, images, and tables to containers
- Tables - Create dynamic line items
- Styling - Customize container appearance