Categories

LibreOffice Template Fill Merge

Replace placeholders in DOCX template and render merged records to PDF using LibreOffice

Mail-merge style PDF generation from DOCX templates.

How it works:

  • Fill template placeholders like {{name}}, ${name}, <<name>>
  • Supports one record or array of records
  • Render each merged DOCX with LibreOffice and combine into one PDF

Example Results

2 examples

Single Record Merge

Fill one record into a DOCX template and render one PDF

libreoffice-template-fill-merge-example1.pdf View File
View input parameters
{ "templateFile": "/Users/quyue/www/elysia-tools/public/samples/docx/merge-template.docx", "mergeDataJson": "{\"name\":\"Alice\",\"company\":\"Elysia Tools\",\"date\":\"2026-02-17\"}" }

Multi Record Merge Batch

Render multiple merge records and combine them into one PDF

libreoffice-template-fill-merge-example2.pdf View File
View input parameters
{ "templateFile": "/Users/quyue/www/elysia-tools/public/samples/docx/merge-template.docx", "mergeDataJson": "[{\"name\":\"Alice\",\"company\":\"Elysia\"},{\"name\":\"Bob\",\"company\":\"Tools\"},{\"name\":\"Carol\",\"company\":\"Studio\"}]" }

Click to upload file or drag and drop file here

Maximum file size: 100MB Supported formats: application/vnd.openxmlformats-officedocument.wordprocessingml.document

Key Facts

Category
Document Tools
Input Types
file, textarea
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

Mail-merge style PDF generation from DOCX templates. **How it works:** - Fill template placeholders like `{{name}}`, `${name}`, `<<name>>` - Supports one record or array of records - Render each merged DOCX with LibreOffice and combine into one PDF

When to Use

  • Use it when you need to convert json, xml content quickly in the browser.
  • Helpful for document tools workflows that need repeatable inputs and fast results.
  • A good fit when you want to test with real files before running the same workflow in code or API calls.

How It Works

  • Provide Template DOCX, Merge Data JSON as input to the tool.
  • The tool processes the request and returns a file result.
  • For file workflows, start with representative samples such as json, xml test files to verify edge cases and output quality.

Use Cases

Convert json, xml data during debugging or QA.
Validate expected output before using the API or automation flows.
Test the workflow with representative sample files and edge cases.

Try with Samples

json, xml, pdf

Related Hubs

FAQ

What does LibreOffice Template Fill Merge do?

LibreOffice Template Fill Merge helps you convert json, xml content online without setting up a separate local script or app.

When should I use this tool?

Use it when you need a quick convert workflow, want to verify output, or need a browser-based utility for document tools tasks.

Can I try this tool with sample data?

Yes. This page can recommend related sample files so you can test the workflow immediately.

What inputs does LibreOffice Template Fill Merge accept?

LibreOffice Template Fill Merge accepts Template DOCX, Merge Data JSON and supports file uploads for 1 field.

Is there an API for LibreOffice Template Fill Merge?

Yes. The tool page includes an API endpoint so you can move from manual testing to scripted usage.

API Documentation

Request Endpoint

POST /en/api/tools/libreoffice-template-fill-merge

Request Parameters

Parameter Name Type Required Description
templateFile file (Upload required) Yes -
mergeDataJson textarea Yes -

File type parameters need to be uploaded first via POST /upload/libreoffice-template-fill-merge to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-libreoffice-template-fill-merge": {
      "name": "libreoffice-template-fill-merge",
      "description": "Replace placeholders in DOCX template and render merged records to PDF using LibreOffice",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=libreoffice-template-fill-merge",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]