DEV Community

Sohail Pathan
Sohail Pathan

Posted on

1

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 :)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →