Java Word Document Manipulation APIs

Develop Java application with the ability to create, process, convert or render Word files to multiple formats.

  Download Free Trial
Aspose.Words for Java

Aspose.Words for Java


Aspose.Words for Java is a feature-rich Word Processing API allowing the developers to embed the ability to generate, modify, convert, render and print all file formats supported by Microsoft Word in their own Java applications. It does not depend upon Microsoft Word, however, it provides the features that Microsoft Word supports via its APIs such as formatting of all document elements, high-quality conversion to multiple formats, rendering individual pages or complete documents to images, generation of reports with data from various sources, revision management and so on.

Aspose.Words for Java supports all the popular Word Processing file formats while allowing the export or conversion to other Word Processing, fixed-layout, image, HTML, ePUB and many industry-standard formats.


Advanced Java Word Library Supports



Mail merge & automated report generation


Table, text, paragraph & image formatting & styling


Table creation using data retrieved from the database


Interconversion of Word Processing file formats


Styling of date & numeric fields during mail merge


Split or combine documents. Move sections between documents.


Document encryption and the ability to load encrypted documents


Find & replace text or enumerate over document elements


Preserve or extract OLE objects & ActiveX controls


Preserve or remove VBA macros


Ability to detect digital signatures


Insert HTML contents


Convert EquationXML to Office Math


LINQ Reporting Engine


Document revision Management

Convert Word Processing File Formats

The ability to quickly and reliably save different document formats with a high degree of precision is the reason most of our customers choose Aspose.Words. The Word Processing & Conversion Java API allows you to save documents from any supported format to any other supported format with just two lines of code. It is really that simple!

Save the document in different formats - Java

// load the file to be converted
Document document = new Document(dir + "template.doc");
// convert doc to docx format + "output.docx", SaveFormat.DOCX);
// convert doc to PDF + "output.pdf", SaveFormat.PDF);
//convert doc to HTML + "output.html", SaveFormat.HTML);

Automated Report Generation with Mail Merge

Aspose.Words for Java library as a fully-featured reporting solution. You can design reports in Microsoft Word and then allow Aspose.Words for Java to populate documents with data from a number of data sources while keeping the mail merge settings preserved. Aspose.Words for Java allows using standard Microsoft Word mail merge fields in reports. Additionally, you can use Aspose.Words for Java extended syntax for mail merge fields to perform more complex tasks during the mail merge operations such as inserting images or repeatable regions. 

Build, Parse & Edit with Document Object Model

Aspose.Words for Java helps developers to create, build, modify, parse and examine loaded documents using our intuitive document object model that consists of over 100 classes. This object model allows the developers to programmatically create, modify, extract and replace all document elements including Sections, Headers, Footers, Paragraphs, Lists, Tables, Text, Fields, Hyperlinks, Bookmarks, Images, Smart tags, Shapes, Custom XML and many other document elements.

Furthermore, all drawing objects including shapes, TextBoxes, images, OLE objects, and controls are supported through this document object model, thus allowing you to perform many tasks such as inserting watermarks in pages or extracting images from a pre-existing document.

Manipulate HTML Files with Ease

Aspose.Words for Java can load & save HTML and XHTML files. The import process is resilient to documents that are not well-formed, that is; invalid or unrecognized elements or attributes can safely be ignored during the import. Conversion to HTML & XHTML is highly customizable thus allowing you to adjust a number of settings to suit the application requirements.

Utility Features to Improve Productivity

Aspose.Words for Java provides useful utility features such as join or split documents, copy fragments between documents, protect or un-protect documents, modify document properties and insert HTML fragments into documents. All of these features are available via easy-to-use APIs to help developers perform complex operations without worrying about the file format specifications.

Join 2 documents - Java

// load source & destination documents
Document srcDoc = new Document(dir + "source.docx");
Document dstDoc = new Document(dir + "destination.docx");
// set the appended document to start from a new page
// append the source document using its original styles
dstDoc.appendDocument(srcDoc, ImportFormatMode.KEEP_SOURCE_FORMATTING);
// save final result + "output.docx");

Microsoft Office Automation - Not Needed

Aspose.Words for Java is built using managed code that does not need Microsoft Office or Microsoft Word to be installed on the machine to work with Word document formats. It is a perfect Microsoft Word automation alternative in terms of supported features, security, stability, scalability, speed and price.

What People Are Saying

Don't just take our word for it. See what users have to say about Aspose.Words APIs.

View Case Studies

Support and Learning Resources


Aspose.Words offers individual Word processing APIs for other popular development environments as listed below: