Office to PDF API
Start building for free today – no credit card required.
Convert Word documents, Excel spreadsheets and PowerPoint presentations to PDF with a single API call. Send the URL of a docx, xlsx or pptx file and get back a PDF that keeps the original pages, slides and formatting – ready to share, archive, or process further.
Claude, ChatGPT, Cursor or your own agent can call
convert-office-to-pdf directly.
Benefits of our Office to PDF API
Turn the documents your team already works with into PDFs without installing an office suite
on your servers. The API accepts Word (docx, doc), Excel (xlsx, xls), PowerPoint (pptx, ppt),
OpenDocument (odt, ods, odp) and RTF files. Each page or slide becomes a PDF page, and the
result plugs straight into the other endpoints – merge it with other files, add a
watermark, or protect it with a password.
Read our API documentation to learn how to convert Office files to PDF.
Multi-language Code Example
curl -X POST https://apdf.io/api/pdf/file/convert \
-H "Authorization: Bearer TOKEN" \
-d file="FILE_URL"
const data = new FormData();
data.append('file', 'FILE_URL');
fetch('https://apdf.io/api/pdf/file/convert', {
headers: {'Authorization': 'Bearer TOKEN'},
method: 'POST',
body: data
})
.then(response => response.json())
.then(json => console.log(json));
use GuzzleHttp\Client;
$client = new Client();
$response = $client->post(
'https://apdf.io/api/pdf/file/convert', [
'headers' => [
'Authorization' => 'Bearer TOKEN'
],
'form_params' => [
'file' => 'FILE_URL'
]
]);
$body = $response->getBody();
echo json_encode($body->getContents());
require 'rest-client'
response = RestClient.post(
'https://apdf.io/api/pdf/file/convert',
{
'file' => 'FILE_URL'
},
{
Authorization: "Bearer TOKEN"
}
)
puts response.body
import requests
response = requests.post(
'https://apdf.io/api/pdf/file/convert',
headers = {
'Authorization': 'Bearer TOKEN'
},
data = {
'file': 'FILE_URL'
}
)
print(response.text)
import (
"fmt"
"github.com/go-resty/resty/v2"
)
func main() {
client := resty.New()
data := map[string]string{
"file": "FILE_URL"
}
resp, _ := client.R().
SetFormData(data).
SetHeader("Authorization", "Bearer TOKEN").
Post("https://apdf.io/api/pdf/file/convert")
fmt.Println(resp.String())
}
import okhttp3.*;
class Pdf {
public static void main(String[] args) throws Exception {
OkHttpClient client = new OkHttpClient();
FormBody formBody = new FormBody.Builder()
.add("file", "FILE_URL")
.build();
Request request = new Request.Builder()
.url("https://apdf.io/api/pdf/file/convert")
.addHeader("Authorization", "Bearer TOKEN")
.post(formBody)
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}
No-Code Office to PDF Conversion
Integrate our Office to PDF API with Zapier Webhooks to automate your document conversions. Convert the contracts, reports and slide decks that land in your cloud storage, CRM or inbox as soon as they arrive, and trigger the conversion from hundreds of apps supported by Zapier – no manual exporting required.
Related PDF tutorials
How to Generate PDFs from Claude
Describe the document, get the PDF: Claude drafts the HTML layout and renders it through the Apdf MCP tools — invoices, reports and one-pagers straight from the conversation, with page format, margins and headers steered in plain English. Revisions are just more chat.
Generate PDF Event Tickets with QR Codes in A6 Format using Go
Learn how to generate A6-sized event tickets with embedded QR codes using Go. This tutorial focuses on small-format PDFs (tickets, badges, labels) using CSS print media and the Apdf API. Perfect for event management systems, concerts, and conferences where scanning and compact printing are essential.
Dynamic Certificate Generation for Online Courses (LMS)
Learn how to dynamically generate professional PDF certificates for online course platforms using PHP. Design certificates with HTML/CSS, use landscape orientation, and automatically generate them when students complete courses.
Your code made the PDF.
Then it went dark.
Opened, read, re-read, dropped on page 4 — you never see any of it. Share the PDFs you generate through Apdf recipient links, and every signal becomes something you can act on: ping Slack, update the CRM, let an agent follow up. Same account, same API token, one more call.
API · Webhook · MCP