Word to PDF API

Convert Microsoft Word documents into PDF files using a REST API.

Convert DOCX and legacy DOC files using docx4j or LibreOffice, depending on the input format and selected conversion mode.

Key features

DOCX and DOC support

Convert modern DOCX and legacy DOC documents into PDF files.

Two conversion engines

Use docx4j for standard DOCX documents or LibreOffice for more complex layouts.

Supported Word formats

DOCX

Modern Microsoft Word documents. The rendering engine depends on the selected conversion mode.

DOC

Legacy Microsoft Word documents. LibreOffice is always used, regardless of the requested mode.

Conversion modes

For DOCX files, choose BASIC or ADVANCED according to document complexity.

BASIC

Converts DOCX files using docx4j. Suitable for standard documents containing text, formatting, tables and images.

Charts are not supported. Rendering of complex headers and footers may vary.

ADVANCED Default mode

Uses LibreOffice for higher-fidelity conversion and improved compatibility with charts, headers, footers and complex layouts.

A Basic license or higher is required for output without the evaluation watermark. Free users can evaluate this mode.

How legacy DOC files are handled

DOC files always use LibreOffice. If mode=BASIC is supplied, the API automatically switches to ADVANCED for conversion.

Because DOC conversion uses LibreOffice, Free users receive a PDF with a permanently embedded evaluation watermark on every page. A Basic license or higher is required for output without this watermark.

Use cases

  • Convert Word reports into PDF documents.
  • Generate PDFs from business documents containing tables and formatted text.
  • Convert legacy DOC files using LibreOffice.

Quick start

Upload a DOCX or DOC file using multipart/form-data, select a conversion mode and authenticate using a JWT Bearer Token.

HTTP method

POST /api/v1/convert/file/word-to-pdf

Request parameters

file
Required multipart file (.docx or .doc).
mode
Optional query parameter: BASIC or ADVANCED. Default: ADVANCED.
Authorization
JWT Bearer Token in the Authorization header.

Successful response

The API returns HTTP 200 with an application/pdf response containing the generated document.

Content-Disposition: attachment; filename="document.pdf"

Response headers identify the rendering engine, its version, the conversion mode and processing time.

Important considerations

  • BASIC mode does not support charts.
  • ADVANCED is recommended for complex layouts.
  • DOC files always use LibreOffice.
  • File processing and request limits apply.
View rate limits

Related APIs and resources

loader