---
title: "Converts a DOC or DOCX document to PDF."
method: POST
path: "/pdf/docx/"
tags: ["PDF"]
---

# Converts a DOC or DOCX document to PDF.

`POST /pdf/docx/`

Converts a Microsoft Word document (.DOCX or .DOC) file to a PDF document.

This service uses a LibreOffice headless server to perform the conversion, and may not support all features of the original document.

**Known discrepancies**

* Some fonts may not be available in the server, and may be substituted by a closest match.
* Some complex formatting may not be preserved, such as background graphics.

**Variables**

Variable replacement is supported with various methods:

* Templated litterals: `{{name}}`
* Word variables, as listed in the document metadata: `{DOCVARIABLE "name"}`

To enable variable replacement as Word variables for your account, please contact the FileForge support.

## Response `201`

PDF Document generated successfully

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `500` — Internal server error

---

[API](https://skmtc.net/onedoclabs/apis/fileforge-api.md) · [All operations](https://skmtc.net/onedoclabs/apis/fileforge-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onedoclabs/fileforge-api/versions/a5a51ce2a2fd/schema)
