<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>18.2</version>
    <classifier>jdk16</classifier>
</dependency>
copied!  
compile(group: 'com.aspose', name: 'aspose-words', version: '18.2', classifier: 'jdk16')
copied!  
<dependency org="com.aspose" name="aspose-words" rev="18.2">
    <artifact name="aspose-words" m:classifier="jdk16" ext="jar"/>
</dependency>
copied!  
libraryDependencies += "com.aspose" % "aspose-words" % "18.2"
copied!  

Java API for Various Document Formats

banner

Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License

Aspose.Words for Java is an advanced Java Word processing API that enables you to perform a great range of document processing tasks directly within your Java applications. Aspose.Words for Java API supports processing word (DOC, DOCX, OOXML, RTF) HTML, OpenDocument, PDF, EPUB, XPS, SWF and all image formats. With Aspose.Words you can generate, modify, and convert documents without using Microsoft Word.

Word API Features

Rendering and Printing

  • Layout document into pages with high fidelity (exactly like Microsoft Word´┐Ż would do that) to all the formats below.
  • Render individual pages or complete documents to PDF, XPS, or SWF.
  • Render document pages to raster images (Multipage TIFF, PNG, JPEG, BMP).
  • Render pages to a Java Graphics object to a specific size.
  • Print document pages using the Java printing infrastructure.
  • Update TOC, page numbers, and other fields before rendering or printing.
  • 3D Effects Rendering through the OpenGL.

Document Content Features

  • Access, create, and modify various document elements.
  • Access and modify all document elements using XmlDocument -like classes and methods.
  • Copy and move document elements between documents.
  • Join and split documents.
  • Specify document protection, open protected, and encrypted documents.
  • Find and replace text, enumerate over document content.
  • Preserve or extract OLE objects and ActiveX controls from the document.
  • Preserve or remove VBA macros from the document. Preserve VBA macros digital signature.

Reporting Features

  • Support of C# syntax and LINQ extension methods directly in templates (even for ADO.NET data sources).
  • Support of repeatable and conditional document blocks (loops and conditions) for tables, lists, and common content.
  • Support of dynamically generated charts and images.
  • Support of insertion of outer documents and HTML blocks into a document.
  • Support of multiple data sources (including of different types) for the generation of a single document.
  • Built-in support of data relations (master-detail).
  • Comprehensive support of various data manipulations such as grouping, sorting, filtering, and others directly in templates.

For a more comprehensive list of features, please visit Feature Overview.

Read & Write Document Formats

Microsoft Word: DOC, DOCX, RTF, DOT, DOTX, DOTM, DOCM FlatOPC, FlatOpcMacroEnabled, FlatOpcTemplate, FlatOpcTemplateMacroEnabled
OpenOffice: ODT, OTT
WordprocessingML: WordML
Web: HTML, MHTML
Fixed Layout: PDF
Text: TXT Other: MD

Save Word Files As

Fixed Layout: XPS, OpenXPS, PostScript (PS)
Images: TIFF, JPEG, PNG, BMP, SVG, EMF, GIF
Web: HtmlFixed
Others: PCL, EPUB, XamlFixed, XamlFlow, XamlFlowPack

Read File Formats

MS Office: DocPreWord60 eBook: MOBI

Supported Environments

  • Microsoft Windows: Windows Desktop & Server (x86, x64)
  • macOS: Mac OS X
  • Linux: Ubuntu, OpenSUSE, CentOS, and others
  • Java Versions: J2SE 7.0 (1.7), J2SE 8.0 (1.8) or above.

Get Started

Aspose.Words Java APIs are hosted at the Aspose Repository. You can easily use Aspose.Words for Java API directly in your Maven projects with simple configurations. For the detailed instructions please visit Installing Aspose.Words for Java from Maven Repository documentation page.

Printing Multiple Pages on One Sheet using Java

// Open the document.
Document doc = new Document(dataDir + "TestFile.doc");

// Create a print job to print our document with.
PrinterJob pj = PrinterJob.getPrinterJob();

// Initialize an attribute set with the number of pages in the document.
PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet();
attributes.add(new PageRanges(1, doc.getPageCount()));

// Pass the printer settings along with the other parameters to the print document.
MultipagePrintDocument awPrintDoc = new MultipagePrintDocument(doc, 4, true, attributes);

// Pass the document to be printed using the print job.
pj.setPrintable(awPrintDoc);

pj.print();

Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License

VersionRelease Date
22.8August 12, 2022
22.7July 14, 2022
22.6June 10, 2022
22.5May 20, 2022
22.4April 7, 2022
22.3March 9, 2022
22.2February 9, 2022
22.1January 8, 2022
21.12December 7, 2021
21.11November 15, 2021
21.10October 20, 2021
21.9September 7, 2021
21.8August 11, 2021
21.7July 11, 2021
21.6June 14, 2021
21.5May 7, 2021
21.4April 8, 2021
21.3March 10, 2021
21.2February 9, 2021
21.1January 5, 2021
20.12December 9, 2020
20.11November 13, 2020
20.10October 23, 2020
20.9September 13, 2020
20.8August 8, 2020
20.7July 16, 2020
20.6June 13, 2020
20.5May 10, 2020
20.4April 19, 2020
20.3March 10, 2020
20.2February 15, 2020
20.1January 6, 2020
19.12December 18, 2019
19.11November 5, 2019
19.10October 11, 2019
19.9September 15, 2019
19.8August 17, 2019
19.7July 9, 2019
19.6June 6, 2019
19.5May 7, 2019
19.4April 6, 2019
19.3March 8, 2019
19.2February 14, 2019
19.1January 4, 2019
18.12December 8, 2018
18.11November 6, 2018
18.10October 12, 2018
18.9September 7, 2018
18.8August 9, 2018
18.7July 16, 2018
18.6June 7, 2018
18.5May 8, 2018
18.4April 4, 2018
18.3March 6, 2018
18.2February 8, 2018
18.1December 26, 2017
17.12December 14, 2017
17.11November 15, 2017
17.10October 8, 2017
17.9September 5, 2017
17.8August 6, 2017
17.7July 6, 2017
17.6June 6, 2017
17.5May 16, 2017
17.4.0April 4, 2017
17.3.0March 6, 2017
17.2.0February 8, 2017
17.1.0January 17, 2017
16.12.0December 11, 2016
16.11.0November 3, 2016
16.10.0October 12, 2016
16.8.0September 10, 2016
16.7.0August 9, 2016
16.6.0July 13, 2016
16.5.0June 23, 2016
16.4.0May 12, 2016
16.3.0April 11, 2016
16.2.0March 17, 2016
16.1.0February 3, 2016
15.12.0January 1, 2016
FileClassifierSize
aspose-words-18.2-android.via.java.jarandroid.via.java11.03 MB
aspose-words-18.2-javadoc.jarjavadoc2.27 MB
aspose-words-18.2-jdk16.jarjdk1610.45 MB
aspose-words-18.2.pom453 bytes