DocuStream
Word to PDF API

Generate PDFs from Word Templates via REST API

Upload a .docx file, send JSON variables, and receive a polished PDF. No Word installation required — DocuStream handles the conversion server-side.

How the Word to PDF API works

1

Build your Word template

Open Microsoft Word or LibreOffice and create your document. Use {{variable}} placeholders wherever you want dynamic content. DocuStream uses docxtemplater under the hood, so standard Handlebars-style syntax works out of the box.

2

Upload the .docx file

POST your .docx file to /api/word-templates. DocuStream scans the document, extracts every {{variable}}, and stores the template — ready to accept data at generation time.

3

Generate a PDF

POST JSON data to /api/word-templates/:id/generate. DocuStream injects your variables into the template, converts the filled .docx to PDF, and returns a signed URL.

4

Deliver to recipients

Return the signed URL to your user, embed it in an email via our email endpoint, or pass it downstream in your automation pipeline. The PDF is stored securely in S3-compatible storage.

Convert a Word template to PDF in one API call

Once your .docx template is uploaded, generating a PDF is a single POST request. Authenticate with your API key and supply the variable data as JSON.

// Generate a PDF from a Word (.docx) template
const response = await fetch('https://your-docustream.app/api/word-templates/wt_abc123/generate', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': 'YOUR_API_KEY',
  },
  body: JSON.stringify({
    variables: {
      clientName: 'Globex Corporation',
      contractDate: 'May 5, 2026',
      value: '$48,000',
      signatory: 'Jane Smith',
    },
  }),
});

const { signedUrl } = await response.json();
// signedUrl → time-limited URL to the generated PDF

What people build with the Word to PDF API

📄

Proposals

Generate personalized sales proposals from a standard Word template. Merge client name, pricing, and scope automatically.

📑

Contracts

Produce execution-ready contracts with party names, dates, and clause variables filled from your CRM or form submission.

📊

Reports

Render data-driven reports — financial summaries, audit results, or project status docs — straight from a .docx layout.

🏅

Certificates

Issue completion or achievement certificates at scale. One Word template, thousands of personalized PDFs.

📬

Offer letters

Send polished offer letters to candidates in seconds. Integrate with your ATS and trigger generation on hire.

🧾

Invoices

Prefer Word-based invoice layouts? Upload once, generate instantly from billing data with signed download links.

Convert Word templates to PDF today

Free plan — 10 PDFs per month, no credit card required. Scale up as your volume grows.

Get started free