---
title: "Render a document as PDF"
method: POST
path: "/api/v3/preview"
tags: ["Parse"]
---

# Render a document as PDF

`POST /api/v3/preview`

Convert a document into a PDF suitable for inline preview.

Accepts a **file upload** (multipart/form-data), a **document URL**, or a **file_id** referencing a document already ingested in the platform (JSON body). The conversion is synchronous — the PDF bytes are returned directly.

**Supported file types:** `.pdf`, `.png`, `.jpg`, `.jpeg`, `.pptx`, `.ppt`, `.odp`, `.docx`, `.odt`, `.doc`, `.html`, `.xhtml`

**Size limit:** 20 MB.

## Request body

- unknown

## Response `200`

PDF rendered successfully. Response body is the raw PDF bytes.

## Other responses

- `400` — Bad request — missing document, unsupported format, or invalid URL.
- `401` — Authentication credentials were not provided or are invalid.
- `413` — File exceeds the 20 MB size limit.
- `422` — Conversion failed — corrupt file or LibreOffice error.
- `429` — Rate limit exceeded. Retry after the delay indicated in the Retry-After header.

---

[API](https://skmtc.dev/lighton/apis/lighton-api.md) · [All operations](https://skmtc.dev/lighton/apis/lighton-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lighton/lighton-api/revisions/86c57e94ef15/schema)
