How to Convert a Word Doc (97–03) to PDF using Java

Older Microsoft Word Documents — specifically, 1997–2003 edition— are saved in a different format than the documents we use now, which makes converting them to new file formats a bit tricky. Thankfully, our suite of legacy Word Doc conversion APIs makes it easy to transition older file formats to ubiquitous destination formats — such as PDF — with ease. In this article, I’ll demonstrate how you can take advantage of our Word Doc (97–03) to PDF API for free using ready-to-run Java code examples from our API Console to structure your API call.

Our first step is to install the Document Conversion API client. We can do so by first adding a reference to the repository in pom.xml:

And then adding a reference to the dependency in pom.xml:

With installation complete, we can add the imports to the top of our file & call the function. In order to use this API for free, you’ll first need to register a free account on our website (this account comes with a limit of 800 API calls per month & zero additional commitments) and copy your API key into the appropriate field below (indicated by the code comments):

All you need to do now is include your inputFile path in the indicated field, and you’re all done — no more code required. Nice & easy!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.