Create PDF

Create a PDF file from other file formats (Word, Excel, PowerPoint, Image and Text).

Code Examples

# 1. Upload document
curl --location 'https://na1.fusion.foxit.com/pdf-services/api/documents/upload' \
--header 'client_id: YOUR_CLIENT_ID' \
--header 'client_secret: YOUR_CLIENT_SECRET' \
--form 'file=@"/path/to/document.docx"'

# 2. Convert to PDF
curl --location 'https://na1.fusion.foxit.com/pdf-services/api/documents/create/pdf-from-word' \
--header 'Content-Type: application/json' \
--header 'client_id: YOUR_CLIENT_ID' \
--header 'client_secret: YOUR_CLIENT_SECRET' \
--data '{
  "documentId": "doc_abc123"
}'

# 3. Check status
curl --location 'https://na1.fusion.foxit.com/pdf-services/api/tasks/xyz789' \
--header 'client_id: YOUR_CLIENT_ID' \
--header 'client_secret: YOUR_CLIENT_SECRET'

# 4. Download result
curl --location 'https://na1.fusion.foxit.com/pdf-services/api/documents/result_doc_id/download' \
--header 'client_id: YOUR_CLIENT_ID' \
--header 'client_secret: YOUR_CLIENT_SECRET'