Features and Functionalities
Overview
Aspose.Words FOSS for Java creates, reads, edits, and converts Word documents without Microsoft Word. Document is the object that holds a whole document, and DocumentBuilder writes content into it. This page lists the formats that were run against the published package and links to a guide for each task.
Supported Formats
These formats were saved and loaded on Java 8, 17 and 21. Each one works in both directions.
| Format | Load | Save |
|---|---|---|
| DOCX | Yes | Yes |
| DOCM (macro-enabled document) | Yes | Yes |
| DOTX (template) | Yes | Yes |
| DOTM (macro-enabled template) | Yes | Yes |
| Flat OPC, plus its macro-enabled, template, and macro-enabled template variants | Yes | Yes |
| Markdown | Yes | Yes |
| Plain text | Yes | Yes |
Formats This Edition Rejects
Saving as PDF, XPS, HTML, MHTML, EPUB, RTF, DOC, ODT, WordML, PNG, SVG, or TIFF (this list is not exhaustive) throws an UnsupportedOperationException whose message starts with FOSS. Loading HTML, ODT, or RTF does the same. These calls were run, not read from the source. DocumentBuilder.insertHtml is a separate method: it ran without an error on a short HTML fragment and put the text into the document.
Task Guides
| Task | Guide |
|---|---|
| Create, open, and merge documents | Working with Documents |
| Write headings and paragraphs | Working with Text |
| Build tables | Working with Tables |
| Find and replace text | Find and Replace |
| Accept tracked changes | Tracked Changes |
| Open documents and Markdown | Loading Documents |
| Save and convert | Saving Documents |
| Name positions in the text | Bookmarks |
| Add footnotes and endnotes | Footnotes and Endnotes |
| Set built-in and custom properties | Document Properties |
| Set page size, orientation and margins | Page Setup |
| Make bulleted and numbered lists | Lists |
| Insert and update fields | Fields |
| Add content controls | Content Controls |
| Insert charts | Charts |
| Read and remove digital signatures | Digital Signatures |
Key Classes
| Class | Description |
|---|---|
Document | Represents a Word document. |
DocumentBuilder | Provides methods to insert text, images and other content, specify font, paragraph and section formatting. |
Range | Represents a contiguous area in a document. |
SaveFormat | Indicates the format in which the document is saved. |
ImportFormatMode | Specifies how formatting is merged when importing content from another document. |
The API reference lists every public type. Only the members shown in these guides were run for this documentation. Each reference page states how many of its members are marked limited or not supported in this edition and how many were not exercised by a verified example; only rejected or limited members carry a marker on their own row.
Known Limitations
- Formats listed under “Formats This Edition Rejects” are rejected when you load or save them. A file in a format that
Documentdoes not recognise, such as a PNG, an SVG or a PDF, is not rejected: its bytes load as plain text. Documenthas no mail merge execution, comparison, page count or page layout methods, and the results of layout-dependent fields such as PAGE and NUMPAGES come back empty.- Digital signatures cannot be created:
DigitalSignatureUtil.signthrows an UnsupportedOperationException whose message starts with FOSS. - Saving as PNG, SVG, TIFF, PDF, or XPS is rejected.