DEV Community

Sohail Pathan
Sohail Pathan

Posted on

File Conversion - Doc to PDF

Hi Devs,

There are several libraries available to convert Word documents to PDFs. Out of all, one of the APIs you should check out is ApyHub's Word to PDF APIs - why? Super quick to test and easy-to-use option.

You can check this out by pasting the below cURL in the terminal.

Note: You will need apy-token for making a successful request, you can get your apy-token by simply signing up from here.

curl --request POST \
  --url 'https://api.apyhub.com/convert/word-url/pdf-file?output=test-sample.pdf&landscape=false' \
  --header 'Content-Type: application/json' \
  --header 'apy-token: ADD-YOUR-APY-TOKEN-HERE' \
  --data '{
    "url":"https://assets.apyhub.com/samples/sample.docx"
}'

Enter fullscreen mode Exit fullscreen mode

Isn't this simple compared to integrating an open source library? Similar to this you can convert files like spreadsheets, PPTx, webpage and images. Check the rest of the APIS from here

Happy Coding, Thanks :)

Top comments (0)