Skip to main content
POST
Office to PDF

Phase

Phase 2 — Uses Gotenberg (LibreOffice) under the hood.

Request

object
required
The Office document to convert. One of:
  • { "url": "https://example.com/report.docx" }
  • { "base64": "UEsDBBQ..." } with filename required.
string
Required when using base64. Must include the file extension to determine format: .docx, .xlsx, .pptx, .odt, .ods, .odp.
boolean
default:"false"
Force landscape orientation. Useful for spreadsheets.
string
default:"a4"
Page size for the output PDF.
string
default:"none"
Compression for the output.
string
default:"url"
url or base64.

Supported formats

Conversion quality depends on font availability. PDFBase bundles 200+ common fonts (Google Fonts, Microsoft core fonts). Custom fonts in Office documents may fall back to similar alternatives.

Response

Example