---
name: "documents_convert_to_pdf"
area: "documents"
title: "Convert a file to PDF"
price: "$0.02"
method: "POST"
url: "https://api.conecto.chat/v1/tools/documents_convert_to_pdf"
mcp_server: "https://api.conecto.chat/mcp/documents"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/documents/documents_convert_to_pdf"
---

# Convert a file to PDF (`documents_convert_to_pdf`)

Turns a Word, Excel, PowerPoint, OpenDocument, RTF, CSV, text, Markdown or HTML file into a PDF; the original stays.

Turn a file in the store into a PDF: Word, Excel, PowerPoint, OpenDocument, RTF, CSV or text files, and Markdown or HTML. The PDF is a new file; the original stays.

Price: $0.02 a call. A call that fails costs nothing.

## Use it when

A document from the store should be sent or signed as a PDF.

## Say this to your agent

> Turn the Word price list Lena uploaded into a PDF for the trade customers.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `file_id` | string | yes | A file in the store (files_upload or files_list give its file_id). Exactly 36 characters. |  |  |
| `name` | string | no | Name for the new file, e.g. "Quote 1042.pdf". 1 to 200 characters. |  |  |
| `link_hours` | integer | no | 1 to 168. |  | `24` |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `documents_convert_to_pdf` on the MCP server `https://api.conecto.chat/mcp/documents` with these arguments:

```json
{
  "file_id": "2b4d6f8a-1c3e-4a5b-9d7f-0e2a4c6e8b1d",
  "name": "Trade price list 2027.pdf"
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/documents_convert_to_pdf \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id": "2b4d6f8a-1c3e-4a5b-9d7f-0e2a4c6e8b1d", "name": "Trade price list 2027.pdf"}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "documents_convert_to_pdf",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.02",
  "balance_usd": "$19.75",
  "result": {
    "file": {
      "file_id": "64183b7e-e05c-451e-9537-8950765f853e",
      "name": "Trade price list 2027.pdf",
      "content_type": "application/pdf",
      "size": "582 bytes",
      "size_bytes": 582,
      "sha256": "7a628ee1199dd863f0236a61a39b6729a977b4ea18a669e9930a57280cb2326e",
      "created_at": "2026-10-14T08:00:00+00:00",
      "download_url": "https://cncto.co/d/64183b7e-e05c-451e-9537-8950765f853e?t=eyJmIjoiNjQxODNiN2UtZTA1Yy00NTFlLTk1MzctODk1MDc2NWY4NTNlIiwiZXhwIjoxNzkyMTYxNjAzfQ:1xHMcl:WIeS_fwGrcdVUAYfGrhWzl5SCB9cTl8qoBr73X96JqM",
      "link_expires_in_hours": 24
    },
    "pages": 1
  }
}
```

`result`: file: the new PDF with its file_id, name, size and download link; and pages.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `not_found` | 404 | No file in the store has that file_id. | Find it with files_list, or upload it first. |
| `already_pdf` | 400 | The file is a PDF already. | Use it as it is. |
| `unsupported_type` | 400 | The file is not a kind that can be converted. | Convert Word, Excel, PowerPoint, OpenDocument, RTF, CSV, text, Markdown or HTML files. |
| `conversion_failed` | 422 | The file could not be converted. | Open and save it again, then retry. |
| `storage_full` | 409 | The file store has no room for the new file. | Delete files with files_delete, or add room with files_add_storage. |
| `too_large` | 413 | The result would be over 25 MB. | Make it smaller, or split it. |
| `unavailable` | 503 | Making PDFs is not switched on, or the PDF service did not answer. | Try again in a moment; nothing was charged. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [documents_create_pdf](https://conecto.chat/tools/documents/documents_create_pdf.md): Makes a PDF from Markdown or HTML and saves it in the file store with a download link. $0.02 a call.
- [documents_template_fields](https://conecto.chat/tools/documents/documents_template_fields.md): The placeholders in a Word (.docx) template, so you know what data filling it needs. Free up to 1,000,000 reads a month.
- [documents_fill_template](https://conecto.chat/tools/documents/documents_fill_template.md): Makes a new Word file from a .docx template, its placeholders filled from data. $0.02 a call.
- [documents_merge_pdfs](https://conecto.chat/tools/documents/documents_merge_pdfs.md): Makes one PDF from several in the store, in the order given. $0.01 a call.
- [documents_read_pdf](https://conecto.chat/tools/documents/documents_read_pdf.md): The text of a PDF in the store, page by page, up to 50 pages a call. Free up to 1,000,000 reads a month.
- [documents_page_images](https://conecto.chat/tools/documents/documents_page_images.md): The pages of a scanned PDF or a photo of a document as images to look at, up to 10 pages a call. $0.005 a call.
- [documents_create_deck](https://conecto.chat/tools/documents/documents_create_deck.md): A PowerPoint deck from your slides, plain or in the business's template, with editable charts, tables and each slide's sources. $0.10 a call.
