Convert MS Office Files to PDF Files in Linux

To convert an Office file to PDF, you need to send a request to the /process endpoint, including the Office file as the input.

Launch Demo

Before you get started, make sure Processor is up and running.

Converting an Office File from Disk

Send a request to the /process endpoint and attach an Office file:

curl -X POST http://localhost:5000/process \
  -F file=@/path/to/example.docx \
  -o result.pdf
POST /process HTTP/1.1
Content-Type: multipart/form-data; boundary=customboundary

--customboundary
Content-Disposition: form-data; name="file"; filename="example.docx"
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document

<DOCX data>
--customboundary--

Converting an Office File from URL

Send a request to the /process endpoint, attaching a URL pointing to the Office file:

curl -X POST http://localhost:5000/process \
  -F url=https://pspdfkit.com/downloads/examples/paper.docx \
  -o result.pdf
POST /process HTTP/1.1
Content-Type: multipart/form-data; boundary=customboundary

--customboundary
Content-Disposition: form-data; name="url"

https://pspdfkit.com/downloads/examples/paper.docx
--customboundary--