Skip to main content
Document generation

Documents from a template and your data.

Design a Word or HTML template once, then merge it with your data to produce finished PDF or Word files — one at a time, or thousands in a single run. No manual editing, no mail-merge add-ins.

Run it anywhere

Generate Document, on every platform.

Add Generate Document as a native no-code action, or call the same operation from the REST API. Design the template once, then run it everywhere.

How it works

Template plus data, in one call.

  • Create the template. Start from a .docx or HTML file and replace every dynamic value with a merge field. Store it in Google Drive, Dropbox, OneDrive or SharePoint.
  • Prepare the data. Structure your values as JSON, XML or CSV so each key matches a field name in the template. Pass it inline as text or as a data file.
  • Call Generate Document. Point the action at the template and the data, choose PDF or Word output, and PDF4me merges the two into a finished file.
  • Route the result. Save the output to storage, attach it to an email, or push it into the next step of the same flow — no manual export.
Word · HTML · Excel JSON · XML · CSV in Single or bulk
generate-document.sh
curl -X POST https://api.pdf4me.com/api/v2/GenerateDocumentSingle \
  -H "Authorization: Basic YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "templateFileType": "Docx",
    "templateFileName": "invoice-template.docx",
    "templateFileData": "<base64 template>",
    "documentDataType": "JSON",
    "documentDataText": "{ \"ClientName\": \"Acme Corp\", \"Total\": \"$3,960\" }",
    "outputType": "PDF"
  }'
Pick your template type

Word, HTML or Excel.

Three ways to author a template, one Generate Document engine behind them. Start from whichever format your design already lives in. Converting an existing Word or Excel file to PDF is the Word & Excel API, not this product.

Word templates

A designed .docx with merge fields. The richest option: loops, LINQ aggregates, images, variables and formatting all in one file. Output PDF or Word.

Read the guide

HTML templates

A handlebars-style HTML template merged with JSON, then rendered to PDF. Ideal when your design already lives on the web or needs full CSS control.

Read the guide

Excel Populate

Aspose Smart Markers (&=Data.Field) drop straight into an .xlsx workbook. Expand rows, recalculate formulas and populate multiple sheets in one call.

Read the guide
What teams generate

Every document you send, on autopilot.

  • Invoices & quotes with line-item tables, running totals and tax rows.
  • Contracts & agreements populated from a CRM deal, kept editable as Word for review.
  • Certificates & offer letters personalised per recipient from a form or spreadsheet row.
  • Reports & statements with charts, grouped sections and dynamic images at scale.
A finished business document generated from a template and structured data.

A finished, print-ready document, merged from a template and your data.

Get your documents done.

Build it into your product with the API, automate it with no code, or use the free tools in your browser. No credit card to begin.

Start with a single callcurl -X POST https://api.pdf4me.com/v1/ConvertToPdf

Free tier · No credit card required