Convert Word, Excel, PowerPoint, and other documents to PDF format
Maximum file size: 50MB
Convert DOCX, XLSX, PPTX, and 10+ more formats to PDF
Professional PDF output with preserved formatting
Quick conversion with server-side processing
Document to PDF conversion transforms your Word documents, Excel spreadsheets, PowerPoint presentations, and other office files into universally compatible PDF format. PDFs preserve formatting across all devices and platforms.
Our converter uses LibreOffice's powerful rendering engine to ensure high-quality output that maintains fonts, layouts, and styling from your original documents.
DOCX, DOC: Microsoft Word documents
ODT: OpenDocument Text (LibreOffice/OpenOffice)
RTF: Rich Text Format
TXT: Plain text files
HTML: Web pages
XLSX, XLS: Microsoft Excel spreadsheets
ODS: OpenDocument Spreadsheet
CSV: Comma-separated values
PPTX, PPT: Microsoft PowerPoint presentations
ODP: OpenDocument Presentation
Secure Processing: All document conversions are processed on our secure servers using industry-standard encryption. Your files are transmitted over HTTPS.
Automatic Deletion: All uploaded documents and converted PDFs are automatically deleted from our servers immediately after the conversion process completes.
No Data Collection: We do not collect, store, or analyze the content of your documents. Our system only processes the files to perform the requested conversion.
Use our API to integrate Document to PDF conversion into your applications
Free tier: Manual conversions through the web interface are free.
API usage: Requires an API key and is billed at $0.01 per page converted.
Billing: Pay-as-you-go monthly billing. No prepaid credits needed.
Rate limit: 60 requests per hour per API key.
The Document to PDF API uses an async job-based workflow with 3 endpoints:
/api/pdf/convert-to-pdf
Start a conversion job. Returns a jobId immediately.
/api/pdf/pdf-job/{jobId}
Check job status. Poll until status is "completed" or "failed".
/api/pdf/pdf-download/{jobId}
Download the converted PDF file.
/api/pdf/to-pdf-status
Check service status and supported document formats.
All API requests require an API key. Get yours from your account dashboard.
X-API-Key: your_api_key_here
documentComplete workflow using cURL commands:
# Step 1: Start conversion job
JOB_RESPONSE=$(curl -X POST "https://www.bastiantechnologies.com/api/pdf/convert-to-pdf" \
-H "X-API-Key: your_api_key_here" \
-F "document=@document.docx")
JOB_ID=$(echo $JOB_RESPONSE | jq -r '.jobId')
echo "Job started: $JOB_ID"
# Step 2: Poll for completion
while true; do
STATUS=$(curl -s "https://www.bastiantechnologies.com/api/pdf/pdf-job/$JOB_ID" \
-H "X-API-Key: your_api_key_here")
JOB_STATUS=$(echo $STATUS | jq -r '.status')
echo "Status: $JOB_STATUS"
if [ "$JOB_STATUS" = "completed" ]; then
DOWNLOAD_URL=$(echo $STATUS | jq -r '.downloadUrl')
break
elif [ "$JOB_STATUS" = "failed" ]; then
echo "Error: $(echo $STATUS | jq -r '.error')"
exit 1
fi
sleep 2
done
# Step 3: Download result
curl -o "converted.pdf" "$DOWNLOAD_URL" \
-H "X-API-Key: your_api_key_here"
echo "Downloaded: converted.pdf"
const API_KEY = 'your_api_key_here';
const API_BASE = 'https://www.bastiantechnologies.com/api/pdf';
async function convertDocumentToPdf(documentFile) {
// Step 1: Start conversion job
const formData = new FormData();
formData.append('document', documentFile);
const startResponse = await fetch(`${API_BASE}/convert-to-pdf`, {
method: 'POST',
headers: { 'X-API-Key': API_KEY },
body: formData
});
if (!startResponse.ok) {
throw new Error(`Failed to start job: ${startResponse.status}`);
}
const { jobId } = await startResponse.json();
console.log('Job started:', jobId);
// Step 2: Poll for completion
let result;
while (true) {
await new Promise(r => setTimeout(r, 1500)); // Wait 1.5s
const statusRes = await fetch(`${API_BASE}/pdf-job/${jobId}`, {
headers: { 'X-API-Key': API_KEY }
});
result = await statusRes.json();
console.log('Progress:', result.progress + '%');
if (result.status === 'completed') break;
if (result.status === 'failed') {
throw new Error(result.error);
}
}
// Step 3: Download result
const fileRes = await fetch(result.downloadUrl, {
headers: { 'X-API-Key': API_KEY }
});
return await fileRes.blob();
}
// Usage
const docFile = document.querySelector('input[type="file"]').files[0];
const pdfBlob = await convertDocumentToPdf(docFile);
// Save the file
const url = URL.createObjectURL(pdfBlob);
const a = document.createElement('a');
a.href = url;
a.download = 'converted.pdf';
a.click();
import requests
import time
API_KEY = "your_api_key_here"
API_BASE = "https://www.bastiantechnologies.com/api/pdf"
headers = {"X-API-Key": API_KEY}
def convert_document_to_pdf(doc_path):
# Step 1: Start conversion job
with open(doc_path, "rb") as f:
files = {"document": f}
response = requests.post(
f"{API_BASE}/convert-to-pdf",
headers=headers,
files=files
)
response.raise_for_status()
job_id = response.json()["jobId"]
print(f"Job started: {job_id}")
# Step 2: Poll for completion
while True:
time.sleep(1.5)
status_response = requests.get(
f"{API_BASE}/pdf-job/{job_id}",
headers=headers
)
result = status_response.json()
print(f"Progress: {result.get('progress', 0)}%")
if result["status"] == "completed":
break
elif result["status"] == "failed":
raise Exception(result.get("error", "Conversion failed"))
# Step 3: Download result
download_response = requests.get(
result["downloadUrl"],
headers=headers
)
output_file = doc_path.rsplit(".", 1)[0] + ".pdf"
with open(output_file, "wb") as f:
f.write(download_response.content)
print(f"Downloaded: {output_file}")
return output_file
# Usage - Convert various document types
convert_document_to_pdf("document.docx") # Word document
convert_document_to_pdf("spreadsheet.xlsx") # Excel spreadsheet
convert_document_to_pdf("presentation.pptx") # PowerPoint
Complete 3-node workflow for Document to PDF conversion with status polling and download:
Node 1: Start Conversion (HTTP Request)
Method: POST
URL: https://www.bastiantechnologies.com/api/pdf/convert-to-pdf
Authentication: Generic Credential Type → Header Auth
Name: X-API-Key
Value: your_api_key_here
Body Content Type: Form-Data/Multipart
Body Parameters:
document (File): {{ $binary.data }}
Options:
Response Format: JSON
Node 2: Poll Status (Loop Until Complete)
// Option A: Use n8n's "Loop Over Items" node
Loop Condition: {{ $json.status !== "completed" && $json.status !== "failed" }}
Max Iterations: 60
// Inside the loop:
// 1. Add Wait node: 2 seconds delay
// 2. Add HTTP Request node:
Method: GET
URL: https://www.bastiantechnologies.com/api/pdf/pdf-job/{{ $('Start Conversion').item.json.jobId }}
Authentication: Same as Node 1
Options:
Response Format: JSON
// Option B: Use "HTTP Request" node with "Retry on Fail"
// and check status in an IF node after
Node 3: Download Result (HTTP Request)
Method: GET
URL: {{ $('Poll Status').item.json.downloadUrl }}
// OR use direct URL:
URL: https://www.bastiantechnologies.com/api/pdf/pdf-download/{{ $('Start Conversion').item.json.jobId }}
Authentication: Same as Node 1
Options:
Response Format: File
Put Output in Field: data
// The binary data will be available at {{ $binary.data }}
// You can then use "Write Binary File" or "Send Email" nodes
Complete n8n Workflow JSON (Import Ready)
{
"name": "Document to PDF Converter",
"nodes": [
{
"name": "Start Conversion",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://www.bastiantechnologies.com/api/pdf/convert-to-pdf",
"sendBody": true,
"contentType": "multipart-form-data",
"sendBinaryData": true,
"binaryPropertyName": "data",
"options": {}
}
},
{
"name": "Wait",
"type": "n8n-nodes-base.wait",
"parameters": { "amount": 2, "unit": "seconds" }
},
{
"name": "Check Status",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "=https://www.bastiantechnologies.com/api/pdf/pdf-job/{{ $('Start Conversion').item.json.jobId }}"
}
},
{
"name": "Download PDF",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "={{ $json.downloadUrl }}",
"options": { "response": { "response": { "responseFormat": "file" } } }
}
}
]
}
💡 Tips:
• Add Header Authentication credential with X-API-Key to all HTTP Request nodes
• For the loop, use n8n's "Loop Over Items" or implement with IF + Merge nodes
• The downloaded PDF will be in binary format, ready for "Write Binary File" or email attachments
• Supported input formats: DOCX, DOC, XLSX, XLS, PPTX, PPT, ODT, ODS, ODP, RTF, TXT, HTML, CSV
The Document to PDF API uses an asynchronous job-based workflow:
Jobs expire after 10 minutes. Download your PDF promptly after conversion completes.