files
files

Preview Office As Pdf

Convert an Office file (PPTX/DOCX/XLSX/...) to PDF on demand for in-app preview.

The frontend FileViewer modal renders PDF in an iframe, but browsers can't render Office Open XML formats natively. This endpoint shells out to LibreOffice headless on the api-gateway pod, caches the converted PDF per file_version, and streams it back so the same modal works for all document types.

PDFs already pass through /preview unchanged — the frontend should only hit this route when the source mime_type is in SUPPORTED_OFFICE_MIMES.

get/api/files/{file_id}/preview-pdf

Request

  • Base URL: https://api.dialogbrain.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.dialogbrain.com/api/files/{file_id}/preview-pdf
  • Auth: none declared

Path parameters

file_idinteger required

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 5 revisions of this API.