Document Stack
Document Stack
Docs

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 CaseProject NameTemplates Inside
Customer billingBillingInvoice, Receipt, Credit Note
Human resourcesHR DocumentsOffer Letter, NDA, Contract
ShippingLogisticsShipping 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.

ElementWhat It DoesExample Use
TextStatic text with rich formattingHeadings, labels, fine print
FieldDynamic placeholder, replaced with data at generationCustomer name, invoice number
ImageStatic or dynamic images (URL or base64)Logos, signatures, product photos
TableData table bound to an array of rowsLine items, attendee lists
IconVector icon from the built-in libraryCheckmarks, status indicators
LineHorizontal or vertical dividerSection 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:

JSON
{
  "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.

Fields that receive 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

  1. Design — Create a template in the Studio Editor with static content and field placeholders
  2. Save — Your template is stored and gets a unique template ID
  3. Generate — Call the API (or use an SDK) with the template ID and your data
  4. Receive — Get back a pixel-perfect PDF, ready to download, email, or store
Each generation takes about 1–3 seconds depending on template complexity. PDFs are generated server-side so they look identical across all devices.