Key Concepts
Understand the building blocks of Document Stack before you start.
Organizations
An Organization is your team's workspace. Everything in Document Stack lives under an organization — projects, templates, API keys, and team members.
- You can create multiple organizations (e.g., one per client or department)
- Invite team members with different roles
- Switch between organizations from the sidebar
Projects
Projects group related templates together and scope your API keys. Think of a project as a folder for a specific use case.
| Example Use Case | Project Name | Templates Inside |
|---|---|---|
| Customer billing | Billing | Invoice, Receipt, Credit Note |
| Human resources | HR Documents | Offer Letter, NDA, Contract |
| Shipping | Logistics | Shipping Label, Packing Slip |
Templates
A Template is the design blueprint for a document. You create it once in the Studio Editor, then generate unlimited PDFs by passing different data each time.
Templates consist of:
- Page Settings — Paper size (A4, Letter, etc.), orientation, margins, background color
- Elements — The visual building blocks you place on the canvas
- Data Schema — The field keys that map to your dynamic data
Elements
Elements are the things you place on your template canvas. Each element can be positioned, sized, and styled independently.
| Element | What It Does | Example Use |
|---|---|---|
| Text | Static text with rich formatting | Headings, labels, fine print |
| Field | Dynamic placeholder, replaced with data at generation | Customer name, invoice number |
| Image | Static or dynamic images (URL or base64) | Logos, signatures, product photos |
| Table | Data table bound to an array of rows | Line items, attendee lists |
| Icon | Vector icon from the built-in library | Checkmarks, status indicators |
| Line | Horizontal or vertical divider | Section separators |
Data Binding
Data binding is what makes templates reusable. You assign a field key to an element (e.g., customer_name), and when you generate a PDF, you pass a JSON object with the values:
{
"customer_name": "Acme Corp",
"invoice_number": "INV-001",
"line_items": [
{ "description": "Design work", "amount": "$500" },
{ "description": "Development", "amount": "$750" }
]
}Document Stack replaces each field with the corresponding value and renders the final PDF.
null or an empty value are automatically hidden in the generated PDF, giving you conditional visibility for free.API Keys
API Keys let you generate PDFs programmatically from your own application. Each key is scoped to a specific project, so it can only access templates within that project.
You create and manage API keys in the API Keys tab of your project dashboard. See Getting API Keys for details.
How PDF Generation Works
- Design — Create a template in the Studio Editor with static content and field placeholders
- Save — Your template is stored and gets a unique template ID
- Generate — Call the API (or use an SDK) with the template ID and your data
- Receive — Get back a pixel-perfect PDF, ready to download, email, or store