In this article, you are going to learn the simplest yet high-quality and high-speed method to convert PDF files to Word format in Java. Perform free PDF to Word conversion from within your Java applications without any restrictions.

PDF to Word

PDF is one of the most commonly used formats for sending a document out to third parties. The reason behind this popularity is PDF compatibility across multiple platforms regardless of any hardware/software requirements. However, in some cases, you would want to convert the PDF document into an editable document format.

So in this article, you will get to know how to:

Java PDF to Word DOC Converter

Thanks to Aspose.PDF for Java - a PDF manipulation Java API that provides easy ways to convert PDF files to a variety of other formats including PDF to DOC and PDF to DOCX. You can download and add API’s JAR file to your project or reference it using the following Maven configurations:


    <name>Aspose Java API</name>



How to Convert PDF to DOC in Java

Once you have referenced Aspose.PDF for Java in your application, you can convert any PDF document to DOC format in a couple of lines of code. The following are the steps required to perform this conversion.

The following code sample shows how to convert PDF to DOC in Java.

Input PDF Document

How to Convert PDF to DOC in Java

Output Word Document

Convert PDF to DOCX in Java

Save PDF as Word DOCX in Java

DOCX is a well-known format for Word documents and in contrast to the DOC format, the structure of DOCX was based on the binary as well as the XML files. In case you want to convert PDF to DOCX format, you can tell the API to do so using the SaveFormat.DocX argument in method.

The following code sample shows how to convert PDF to DOCX in Java.

Export PDF to Word in Java - More Options

Aspose.PDF for Java also provides some additional options that you can use in PDF to Word conversion, such as the output format, image resolution, distance between text lines, and so on. DocSaveOptions class is used for this purpose and the following is the list of options you can use:

The following code sample shows how to use DocSaveOptions class in PDF to DOCX conversion using Java.

Free PDF to Word Java Converter

You can get a free temporary license to convert PDF files to Word formats without evaluation limitations.

PDF to Word Converter - Read More

You can learn more about converting PDF to other formats from the documentation.


In this article, you have learned how easy it is to convert PDF files to Word format in Java. You can either convert PDF to DOC or PDF to DOCX based on your requirements. Furthermore, additional features to customize the PDF to Word conversion were also discussed.