Iteration Layer
Document Generation

Generate PDF, DOCX, EPUB, and PPTX from structured data

Define your document structure with content blocks, styles, and fonts — get back a PDF, DOCX, EPUB, or PPTX file. No template engine or typesetting library needed.

No credit card required — start with free trial credits

Zero data retention · GDPR Made & hosted in the EU $65 free trial credits No credit card required 14-day money-back guarantee

One output feeds the next

Document Generation is part of a complete content pipeline. One key, one credit pool, and structured JSON responses designed to chain together.

Fits into your existing stack

Native SDKs for Node, Python, and Go. OpenAPI spec for everything else. MCP server for AI agents and Claude Code skills. n8n community node for visual workflows.

Mix and match freely

Extract data from a document, generate visuals from the results, then compile everything into a finished report. Mix, match, and build your own pipeline.

Three steps to your first document

01

Define your document

Describe metadata, page size, fonts, and styles. Choose from 19 page size presets (A0-A6, B0-B6, Letter, Legal, Tabloid, Executive, Statement) or set custom dimensions.

  • 19 page size presets plus custom dimensions
  • Embed custom fonts (TTF, OTF, WOFF, WOFF2) with weight and style variants
  • Two-layer style system: document defaults + per-block overrides
02

Add content blocks

Build your document from 12 block types: paragraphs with rich text, headlines (h1-h6), images, tables, 12-column grids, ordered and unordered lists, table of contents, separators, QR codes, and barcodes.

  • Rich text with bold, italic, links, and markdown
  • Tables with headers, column widths, and cell spans
  • 12-column grid layout for multi-column designs
03

Choose your format

Get back a base64-encoded document in PDF, DOCX, EPUB, or PPTX. Headers, footers, and page numbers are supported. For PPTX, each page break creates a new slide.

  • PDF with headers, footers, and page numbers
  • DOCX with full formatting and embedded images
  • EPUB with navigation, fonts, and images
  • PPTX with slides split by page breaks

Templates As Code

12 content block types — paragraphs, tables, grids, lists, QR codes, barcodes — defined as JSON. No template engine, no typesetting language, no browser.

One API, Four Formats

Generate PDF, DOCX, EPUB, and PPTX from the same document definition. EPUB and PPTX are rare capabilities most document APIs don't offer. Switch the format field — the content and styles carry over.

Two-Layer Styles

Set document-wide defaults for fonts, colors, and spacing, then override per block. Custom TTF, OTF, WOFF, and WOFF2 fonts with weight and style variants, 19 page size presets.

Real-world pipelines, ready to ship

Each recipe chains multiple APIs into a complete workflow. Pick one, tweak it, and deploy — or use it as a starting point for your own pipeline.

Generate a Compliance Audit Document

Generate a formatted PDF compliance audit document with findings, risk ratings, remediation recommendations, and sign-off sections.

Generate DOCX Contract

Generate an editable DOCX service agreement with parties, terms, and payment schedule.

Generate Employee Offer Letter

Generate a professional offer letter PDF with role, compensation, start date, and company details.

Generate EPUB Book

Generate a complete EPUB e-book with chapters, table of contents, and rich text formatting.

Generate NDA

Generate a non-disclosure agreement PDF with party names, effective date, and standard confidentiality terms.

Generate Packing Slip

Generate a packing slip PDF with order details, item list, and shipping address.

Generate PDF Certificate

Generate a professional achievement certificate with recipient name, course details, date, and a QR code for formal download or print.

Generate PDF Invoice

Generate a professional PDF invoice with company branding, line items, and totals.

Generate PDF Manuscript

Generate a print-ready PDF manuscript with title page, table of contents, and chapters at 6x9 inch trim size.

Generate PDF Report

Generate a professional PDF report with title, executive summary, data table, and footer.

Generate Product Datasheet

Generate a professional product specification sheet with images, feature tables, technical specs, and contact information.

Generate Quarterly Report

Create a structured quarterly business report with table of contents, data tables, and page numbers.

Generate Restaurant Menu

Generate a branded restaurant menu PDF with sections, items, prices, and descriptions.

Generate Shipping Label

Generate a compact PDF shipping label with sender and recipient addresses, barcode, and tracking number.

Generate Slide Deck

Build a PowerPoint slide deck with title slide, content slides, and call-to-action page.

Generate a White-Label PDF Report

Generate a branded PDF report with custom client logo placeholder, colors, and content sections for white-label agency delivery.

Convert Markdown to Styled PDF

Generate a professionally styled PDF document from Markdown content with custom fonts, headers, and page numbers.

One n8n node for your entire pipeline

Most n8n document workflows chain three or four separate services. The Iteration Layer community node covers extraction, transformation, and generation in a single install — wire up multi-step pipelines visually instead of writing glue code.

Start building right now

One API call, one credit deducted. Chains naturally with our other APIs — pipe the output of one into the next without glue code. You'll be up and running in minutes.

  • Full OpenAPI 3.1 specification available for code generation and IDE integration.
  • MCP server support for seamless integration with AI agents and tools.
  • Comprehensive documentation with examples for every field type and edge case.
Input Preview
{
  "format": "pdf",
  "document": {
    "metadata": { "title": "Series A Board Pack" },
    "page": {
      "size": { "preset": "A4" },
      "margins": {
        "top_in_pt": 48,
        "right_in_pt": 48,
        "bottom_in_pt": 54,
        "left_in_pt": 48
      }
    },
    "styles": {
      "text": { "font_family": "Helvetica", "font_size_in_pt": 11, "color": "#334155", "line_height": 1.5 },
      "headline": { "font_family": "Helvetica", "font_size_in_pt": 28, "color": "#0F172A", "font_weight": "bold" },
      "table": {
        "header": { "background_color": "#E2E8F0", "text_color": "#0F172A", "font_size_in_pt": 10, "font_weight": "bold" },
        "body": { "background_color": "#FFFFFF", "text_color": "#334155", "font_size_in_pt": 10 }
      }
    },
    "content": [
      { "type": "headline", "level": "h1", "text": "Series A Board Pack" },
      { "type": "paragraph", "markdown": "**Q4 revenue:** USD 4.8M  |  **Gross margin:** 78%  |  **Net retention:** 123%" },
      { "type": "separator" },
      { "type": "headline", "level": "h2", "text": "Operating Highlights" },
      { "type": "list", "variant": "unordered", "items": [
        { "text": "Opened Frankfurt region with 14 enterprise accounts" },
        { "text": "Reduced median document extraction latency to 1.9 seconds" },
        { "text": "Launched deterministic OG image generation for every public page" }
      ] },
      { "type": "headline", "level": "h2", "text": "Regional Revenue" },
      { "type": "table", "column_widths_in_percent": [34, 22, 18, 26], "header": { "cells": [
        { "text": "Region" },
        { "text": "Revenue" },
        { "text": "Growth" },
        { "text": "Gross Margin" }
      ] }, "rows": [
        { "cells": [{ "text": "North America" }, { "text": "USD 2.1M" }, { "text": "+31%" }, { "text": "81%" }] },
        { "cells": [{ "text": "Europe" }, { "text": "USD 1.7M" }, { "text": "+26%" }, { "text": "77%" }] },
        { "cells": [{ "text": "APAC" }, { "text": "USD 1.0M" }, { "text": "+18%" }, { "text": "73%" }] }
      ] },
      { "type": "paragraph", "markdown": "Next quarter focus: enterprise onboarding, deeper spreadsheet generation adoption, and gross margin expansion." }
    ]
  }
}
Output Preview
Generated board pack PDF preview

First page preview of the generated PDF

Request
curl -X POST \
  https://api.iterationlayer.com/document-generation/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "format": "pdf",
  "document": {
    "metadata": {
      "title": "Series A Board Pack"
    },
    "page": {
      "size": { "preset": "A4" },
      "margins": {
        "top_in_pt": 48,
        "right_in_pt": 48,
        "bottom_in_pt": 54,
        "left_in_pt": 48
      }
    },
    "styles": {
      "text": {
        "font_family": "Helvetica",
        "font_size_in_pt": 11,
        "color": "#334155",
        "line_height": 1.5
      },
      "headline": {
        "font_family": "Helvetica",
        "font_size_in_pt": 28,
        "color": "#0F172A",
        "font_weight": "bold"
      },
      "table": {
        "header": {
          "background_color": "#E2E8F0",
          "text_color": "#0F172A",
          "font_size_in_pt": 10,
          "font_weight": "bold"
        },
        "body": {
          "background_color": "#FFFFFF",
          "text_color": "#334155",
          "font_size_in_pt": 10
        }
      }
    },
    "content": [
      {
        "type": "headline",
        "level": "h1",
        "text": "Series A Board Pack"
      },
      {
        "type": "paragraph",
        "markdown": "**Q4 revenue:** USD 4.8M  |  **Gross margin:** 78%  |  **Net retention:** 123%"
      },
      {
        "type": "separator"
      },
      {
        "type": "headline",
        "level": "h2",
        "text": "Operating Highlights"
      },
      {
        "type": "list",
        "variant": "unordered",
        "items": [
          { "text": "Opened Frankfurt region with 14 enterprise accounts" },
          { "text": "Reduced median document extraction latency to 1.9 seconds" },
          { "text": "Launched deterministic OG image generation for every public page" }
        ]
      },
      {
        "type": "headline",
        "level": "h2",
        "text": "Regional Revenue"
      },
      {
        "type": "table",
        "column_widths_in_percent": [34, 22, 18, 26],
        "header": {
          "cells": [
            { "text": "Region" },
            { "text": "Revenue" },
            { "text": "Growth" },
            { "text": "Gross Margin" }
          ]
        },
        "rows": [
          { "cells": [{ "text": "North America" }, { "text": "USD 2.1M" }, { "text": "+31%" }, { "text": "81%" }] },
          { "cells": [{ "text": "Europe" }, { "text": "USD 1.7M" }, { "text": "+26%" }, { "text": "77%" }] },
          { "cells": [{ "text": "APAC" }, { "text": "USD 1.0M" }, { "text": "+18%" }, { "text": "73%" }] }
        ]
      },
      {
        "type": "paragraph",
        "markdown": "Next quarter focus: enterprise onboarding, deeper spreadsheet generation adoption, and margin expansion."
      }
    ]
  }
}'
Response
{
  "success": true,
  "data": {
    "buffer": "JVBERi0xLjcKMSAwIG9iago8...",
    "mime_type": "application/pdf"
  }
}
Request
import { IterationLayer } from "iterationlayer";

const client = new IterationLayer({
  apiKey: "YOUR_API_KEY",
});

const result = await client.generateDocument({
  format: "pdf",
  document: {
    metadata: { title: "Series A Board Pack" },
    page: {
      size: { preset: "A4" },
      margins: {
        top_in_pt: 48,
        right_in_pt: 48,
        bottom_in_pt: 54,
        left_in_pt: 48,
      },
    },
    styles: {
      text: {
        font_family: "Helvetica",
        font_size_in_pt: 11,
        color: "#334155",
        line_height: 1.5,
      },
      headline: {
        font_family: "Helvetica",
        font_size_in_pt: 28,
        color: "#0F172A",
        font_weight: "bold",
      },
      table: {
        header: {
          background_color: "#E2E8F0",
          text_color: "#0F172A",
          font_size_in_pt: 10,
          font_weight: "bold",
        },
        body: {
          background_color: "#FFFFFF",
          text_color: "#334155",
          font_size_in_pt: 10,
        },
      },
    },
    content: [
      {
        type: "headline",
        level: "h1",
        text: "Series A Board Pack",
      },
      {
        type: "paragraph",
        markdown: "**Q4 revenue:** USD 4.8M  |  **Gross margin:** 78%  |  **Net retention:** 123%",
      },
      {
        type: "separator",
      },
      {
        type: "headline",
        level: "h2",
        text: "Operating Highlights",
      },
      {
        type: "list",
        variant: "unordered",
        items: [
          { text: "Opened Frankfurt region with 14 enterprise accounts" },
          { text: "Reduced median document extraction latency to 1.9 seconds" },
          { text: "Launched deterministic OG image generation for every public page" },
        ],
      },
      {
        type: "headline",
        level: "h2",
        text: "Regional Revenue",
      },
      {
        type: "table",
        column_widths_in_percent: [34, 22, 18, 26],
        header: {
          cells: [
            { text: "Region" },
            { text: "Revenue" },
            { text: "Growth" },
            { text: "Gross Margin" },
          ],
        },
        rows: [
          { cells: [{ text: "North America" }, { text: "USD 2.1M" }, { text: "+31%" }, { text: "81%" }] },
          { cells: [{ text: "Europe" }, { text: "USD 1.7M" }, { text: "+26%" }, { text: "77%" }] },
          { cells: [{ text: "APAC" }, { text: "USD 1.0M" }, { text: "+18%" }, { text: "73%" }] },
        ],
      },
      {
        type: "paragraph",
        markdown: "Next quarter focus: enterprise onboarding, deeper spreadsheet generation adoption, and margin expansion.",
      },
    ],
  },
});
Response
{
  "success": true,
  "data": {
    "buffer": "JVBERi0xLjcKMSAwIG9iago8...",
    "mime_type": "application/pdf"
  }
}
Request
from iterationlayer import IterationLayer

client = IterationLayer(
    api_key="YOUR_API_KEY"
)

result = client.generate_document(
    format="pdf",
    document={
        "metadata": {
            "title": "Series A Board Pack",
        },
        "page": {
            "size": {"preset": "A4"},
            "margins": {
                "top_in_pt": 48,
                "right_in_pt": 48,
                "bottom_in_pt": 54,
                "left_in_pt": 48,
            },
        },
        "styles": {
            "text": {
                "font_family": "Helvetica",
                "font_size_in_pt": 11,
                "color": "#334155",
                "line_height": 1.5,
            },
            "headline": {
                "font_family": "Helvetica",
                "font_size_in_pt": 28,
                "color": "#0F172A",
                "font_weight": "bold",
            },
            "table": {
                "header": {
                    "background_color": "#E2E8F0",
                    "text_color": "#0F172A",
                    "font_size_in_pt": 10,
                    "font_weight": "bold",
                },
                "body": {
                    "background_color": "#FFFFFF",
                    "text_color": "#334155",
                    "font_size_in_pt": 10,
                },
            },
        },
        "content": [
            {
                "type": "headline",
                "level": "h1",
                "text": "Series A Board Pack",
            },
            {
                "type": "paragraph",
                "markdown": "**Q4 revenue:** USD 4.8M  |  **Gross margin:** 78%  |  **Net retention:** 123%",
            },
            {
                "type": "separator",
            },
            {
                "type": "headline",
                "level": "h2",
                "text": "Operating Highlights",
            },
            {
                "type": "list",
                "variant": "unordered",
                "items": [
                    {"text": "Opened Frankfurt region with 14 enterprise accounts"},
                    {"text": "Reduced median document extraction latency to 1.9 seconds"},
                    {"text": "Launched deterministic OG image generation for every public page"},
                ],
            },
            {
                "type": "headline",
                "level": "h2",
                "text": "Regional Revenue",
            },
            {
                "type": "table",
                "column_widths_in_percent": [34, 22, 18, 26],
                "header": {
                    "cells": [
                        {"text": "Region"},
                        {"text": "Revenue"},
                        {"text": "Growth"},
                        {"text": "Gross Margin"},
                    ]
                },
                "rows": [
                    {"cells": [{"text": "North America"}, {"text": "USD 2.1M"}, {"text": "+31%"}, {"text": "81%"}]},
                    {"cells": [{"text": "Europe"}, {"text": "USD 1.7M"}, {"text": "+26%"}, {"text": "77%"}]},
                    {"cells": [{"text": "APAC"}, {"text": "USD 1.0M"}, {"text": "+18%"}, {"text": "73%"}]},
                ],
            },
            {
                "type": "paragraph",
                "markdown": "Next quarter focus: enterprise onboarding, deeper spreadsheet generation adoption, and margin expansion.",
            },
        ],
    },
)
Response
{
  "success": true,
  "data": {
    "buffer": "JVBERi0xLjcKMSAwIG9iago8...",
    "mime_type": "application/pdf"
  }
}
Request
import il "github.com/iterationlayer/sdk-go"

client := il.NewClient("YOUR_API_KEY")

result, err := client.GenerateDocument(
  il.GenerateDocumentRequest{
    Format: "pdf",
    Document: il.DocumentDefinition{
      Metadata: il.DocumentMetadata{
        Title: "Series A Board Pack",
      },
      Page: il.DocumentPage{
        Size: il.DocPageSize{
          Preset: "A4",
        },
        Margins: il.DocMargins{
          TopInPt:    48,
          RightInPt:  48,
          BottomInPt: 54,
          LeftInPt:   48,
        },
      },
      Styles: il.DocumentStyles{
        Text: il.TextStyle{
          FontFamily:  "Helvetica",
          FontSizeInPt: 11,
          Color:       "#334155",
          LineHeight:  1.5,
        },
        Headline: il.HeadlineStyle{
          FontFamily:  "Helvetica",
          FontSizeInPt: 28,
          Color:       "#0F172A",
        },
      },
      Content: []il.ContentBlock{
        il.NewHeadlineBlock("h1", "Series A Board Pack"),
        il.ParagraphBlock{
          Type:     "paragraph",
          Markdown: "**Q4 revenue:** USD 4.8M  |  **Gross margin:** 78%  |  **Net retention:** 123%",
        },
        il.NewSeparatorBlock(),
        il.NewHeadlineBlock("h2", "Operating Highlights"),
        il.ListBlock{Type: "list", Variant: "unordered", Items: []il.ListItem{
          {Text: "Opened Frankfurt region with 14 enterprise accounts"},
          {Text: "Reduced median document extraction latency to 1.9 seconds"},
          {Text: "Launched deterministic OG image generation for every public page"},
        }},
        il.NewHeadlineBlock("h2", "Regional Revenue"),
        il.NewTableBlock([]il.TableRow{
          {Cells: []il.TableCell{{Text: "North America"}, {Text: "USD 2.1M"}, {Text: "+31%"}, {Text: "81%"}}},
          {Cells: []il.TableCell{{Text: "Europe"}, {Text: "USD 1.7M"}, {Text: "+26%"}, {Text: "77%"}}},
          {Cells: []il.TableCell{{Text: "APAC"}, {Text: "USD 1.0M"}, {Text: "+18%"}, {Text: "73%"}}},
        }),
        il.ParagraphBlock{Type: "paragraph", Markdown: "Next quarter focus: enterprise onboarding, deeper spreadsheet generation adoption, and margin expansion."},
      },
    },
  },
)
Response
{
  "success": true,
  "data": {
    "buffer": "JVBERi0xLjcKMSAwIG9iago8...",
    "mime_type": "application/pdf"
  }
}

Official SDKs for every major language

Install the SDK, set your API key, and start chaining requests. Full type safety, automatic retries, and idiomatic error handling included.

Your data stays in the EU

Your data is processed on EU servers and never stored beyond temporary logs. Zero retention, GDPR-compliant by design, with a Data Processing Agreement available for every customer. Learn more about our security practices .

No data storage, no model training

We don't store your files or processing results, and your data is never used to train or improve AI models. Logs are automatically deleted after 90 days.

EU-hosted infrastructure

All processing runs on servers located in the European Union. Your data never leaves the EU.

GDPR-compliant by design

Full compliance with EU data protection regulations. Data Processing Agreement available for all customers.

Pricing

Start with free trial credits. No credit card required.

Developer

For individuals & small projects

$29.99 /month
1,000 credits included
Most Popular

Startup

Save 40%

For growing teams

$119.99 /month
5,000 credits included

Business

Save 47%

For high-volume workloads

$319.99 /month
15,000 credits included

Or pay as you go from $0.022/credit with automatic volume discounts.

All APIs included Free trial credits per API Project-based budget caps Auto overage billing

Still evaluating?

Compare Iteration Layer against the biggest alternatives at a glance, then open the full head-to-head pages when you want the details.

Feature Iteration Layer Carbone DocRaptor Puppeteer
Output formats
4 formats
PDF, DOCX, EPUB, and PPTX from the same content definition
PDF
Primarily PDF output via LibreOffice rendering from DOCX/ODT templates
PDF, XLS
PDF and XLS output via Prince XML rendering engine
PDF only
Generates PDF output only
Template model
JSON blocks
Content defined as JSON block arrays — versionable and diffable
Binary files
Templates are DOCX or ODT binary files that cannot be diffed or reviewed in version control
HTML/CSS
Uses HTML and CSS Paged Media specification, which is separate from standard browser CSS
HTML/JS
HTML and CSS rendered through a full Chromium browser engine
Custom fonts
Yes
Upload and use custom fonts in any document
Limited
Fonts must be installed in the LibreOffice environment before they can be used
Yes
Fonts referenced via CSS @font-face declarations pointing to hosted font files
System fonts
Uses fonts installed on the system or loaded via CSS @font-face
Infrastructure required
None
Fully managed API with no deployment or infrastructure to manage
Self-hosted
Requires self-hosting or using Carbone Cloud
None
Fully managed SaaS platform with no infrastructure to manage
Chromium
Requires Node.js and a Chromium instance consuming 200-300 MB per concurrent render

See how we compare to our competitors

Carbone DocRaptor Puppeteer Gotenberg

Frequently asked questions

What output formats are supported?
The API generates PDF, DOCX, EPUB, and PPTX documents. All formats are created from the same document definition, so you can switch formats without changing your content.
How does the style system work?
You define document-level defaults for text, headlines, tables, and other elements. Individual blocks can override any style property. This two-layer system keeps your documents consistent while allowing per-block customization.
Can I use custom fonts?
Yes. Embed any TTF, OTF, WOFF, or WOFF2 font by including its base64-encoded buffer in the request. Specify weight (thin to black) and style (normal or italic) for each font variant.
What content blocks are available?
The API supports 12 block types: paragraph (with rich text and markdown), headline (h1-h6), image, table, grid (12-column layout), list (ordered and unordered with nesting), table of contents, page break, separator, page number, QR code, and barcode.
How do PPTX slides work?
For PPTX output, each page-break block creates a new slide. Content before the first page break goes on slide 1. Headlines become slide titles, and other blocks are mapped to slide elements.
Can I add headers and footers?
Yes, for PDF and DOCX output. Define header and footer content using the same block types as the main body. Headers and footers appear on every page. Use the page-number block type to show page numbers. EPUB and PPTX do not support headers and footers.

Built for how you work

Whether you're building pipelines in code, automating workflows, orchestrating AI agents, or shipping client projects — Iteration Layer fits your process.