Skip to main content

Convert to PDF

ConvertConvert to PDF

The Convert to PDF API converts many document types into PDF. You send the document as Base64 (docContent), docName (output name without extension), IsAsync, and optionally document with Name (original source file name with extension, e.g. report.xlsx). Supports 50+ formats (Word, Excel, PowerPoint, images, and more). The API returns the PDF (or 202 + Location for async). Use the tester below to try it; more details are in the sections that follow.

Try the Convert to PDF API

Quick reference

Endpoint: POST /api/v2/ConvertToPdf · Required: api-key, docContent, docName, IsAsync · Optional: document (object with Name)

Try it live

Use the form below to send your API key and document (Base64). The response is the PDF (or polling URL when async). No code required—fill the fields and click Send request.

Loading API Tester...

Overview, parameters, and use cases

What is Convert to PDF?

This endpoint converts a wide range of document formats into PDF. You provide the document (Base64), docName (output name), IsAsync, and optionally document with Name for the source file name (with extension). Supported formats include Word, Excel, PowerPoint, images, and 50+ other types. The API returns the PDF or a Location URL for async polling.

Key features

  • 50+ formats – Word, Excel, PowerPoint, images, and many other document types.
  • Single request – Send docContent, docName, IsAsync; optional document { "Name": "file.ext" } for source metadata; no format parameter needed (detected from content).
  • AsyncIsAsync returns 202 with Location URL for polling.
Best for

Use when you have a document in another format and need a PDF. For specific conversions see Convert PDF to Word, Convert HTML to PDF, or Convert Markdown to PDF.

Prerequisites

Before using this endpoint, make sure you have:

  • A valid PDF4me API key (Get your API Key)
  • A document file in Base64 format (Word, Excel, PowerPoint, image, etc.)

Response Format

The API returns a PDF document:

  • Status 200: Document to PDF conversion completed immediately - binary PDF content in response body
  • Status 202: Request accepted and processing asynchronously - use the Location header URL to poll for results

For asynchronous requests, poll the Location URL until status 200 is returned with the PDF document.

Get Help