<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-merger</artifactId>
    <version>22.2</version>
</dependency>
copied!  
compile(group: 'com.groupdocs', name: 'groupdocs-merger', version: '22.2')
copied!  
<dependency org="com.groupdocs" name="groupdocs-merger" rev="22.2">
    <artifact name="groupdocs-merger" ext="jar"/>
</dependency>
copied!  
libraryDependencies += "com.groupdocs" % "groupdocs-merger" % "22.2"
copied!  

High Code Java API to Merge & Join Documents

banner

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

GroupDocs.Merger for Java on-premise API for merging multiple documents into a single resultant file. Supports joining files of different extensions (formats) into a single format document. OLE object insertions can also be done. You can also change page order, remove desired pages, and split single document into multiple smaller files.

Document Joiner On-premise Java API Features

  • Create a single document by merging multiple (two or more) documents.
  • Join Microsoft Word® documents to each other while preserving content, formatting, & page setup.
  • Specify desired page numbers or page ranges from multiple documents to merge together to create the resultant document.
  • Ability to cross-merge documents of different file extensions into a single file format resultant document.
  • Combine different types of files (DOC, PPT, XLS) into a single PDF, XPS, DOC, DOCX file.
  • Generate document pages preview in the PNG, JPG, or BMP format.
  • Add attachments (such as PPT) to a PDF file.
  • Insert OLE objects into Word®, OpenOffice®, Excel®, PowerPoint®, & Visio® files.
  • Check if a document is password protected, add / remove / update document password.
  • Fetch document information including, file type, page count, page information.
  • Ability to keep a log of document manipulation process.
  • Support for various single page operations, such as;

Supported Document Merger File Formats

The joining & splitting operations are supported for the following file formats:

Microsoft Word®: DOC/DOCX/DOCM/DOT/DOTX/DOTM/RTF
OpenOffice Writer: ODT/OTT
Micorosft Excel®: XLS/XLSX/XLSB/XLSM/XLT/XLTX/XLTM/XLAM
OpenOffice Calc®: ODS
Microsoft PowerPoint®: PPT/PPTX/PPS/PPSX
OpenOffice Impress®: ODP/OTP
Microsoft Visio®: VSDX/VSDM/VSSX/VSSM/VSTX/VSTM/VDX/VSX/VTX
Microsoft OneNote®: ONE
Web: HTML/MHT/MHTML
Fixed Layout: PDF/XPS
LaTeX: TEX
eBook: EPUB
Text: TXT/ERR/CSV/TSV

The trimming, moving, removing, swapping & chaning page orietation operations are supported for the following file formats:

Microsoft Word®: DOC/DOCX/DOCM/DOT/DOTX/DOTM/RTF
OpenOffice Writer: ODT/OTT
Micorosft Excel®: XLS/XLSX/XLSB/XLSM/XLT/XLTX/XLTM/XLAM
OpenOffice Calc®: ODS
Microsoft PowerPoint®: PPT/PPTX/PPS/PPSX
OpenOffice Impress®: ODP/OTP
Microsoft Visio®: VSDX/VSDM/VSSX/VSSM/VSTX/VSTM/VDX/VSX/VTX
Microsoft OneNote®: ONE
Web: HTML/MHT/MHTML
Fixed Layout: PDF/XPS
LaTeX: TEX
eBook: EPUB

The page rotation operation is supported for the following file formats:

Fixed Layout: PDF/XPS
LaTeX: TEX
eBook: EPUB

The document import operation is supported for the following file formats:

Microsoft Word®: DOC/DOCX/DOCM/DOT/DOTX/DOTM/RTF
OpenOffice Writer: ODT/OTT
Micorosft Excel®: XLS/XLSX/XLSB/XLSM/XLT/XLTX/XLTM/XLAM
OpenOffice Calc®: ODS
Microsoft PowerPoint®: PPT/PPTX/PPS/PPSX
OpenOffice Impress®: ODP/OTP
Microsoft Visio®: VSDX/VSDM/VSSX/VSSM/VSTX/VSTM/VDX/VSX/VTX
Fixed Layout: PDF

The cross-format merge to PDF/XPS operation is supported for the following file formats:

Microsoft Word®: DOC/DOCX/DOCM/DOT/DOTX/DOTM/RTF
OpenOffice Writer: ODT/OTT
Micorosft Excel®: XLS/XLSX/XLSB/XLSM/XLT/XLTX/XLTM/XLAM
OpenOffice Calc®: ODS
Microsoft PowerPoint®: PPT/PPTX/PPS/PPSX
OpenOffice Impress®: ODP/OTP
Web: HTML
Fixed Layout: PDF/XPS

The cross-format merge to DOC/DOCX operation is supported for the following file formats:

Fixed Layout: PDF/XPS
LaTeX: TEX
eBook: EPUB

For details and limitations please visit, Supported Document Formats.

System Requirements

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

GroupDocs.Merger for Java does not require any external software or third party tool to be installed. Just follow one of the ways as described in Installation and Configuration.

Get Started

GroupDocs hosts all Java APIs at the GroupDocs Repository. You can easily use GroupDocs.Merger for Java API directly in your Maven projects with simple configurations. For the detailed instructions please visit Installation from GroupDocs Repository using Maven documentation page.

Sample Java code to Join two Word® DOCX documents into one

String filePath = "c:\sample.docx";
String filePath2 = "c:\sample2.docx";
String filePathOut = "c:\output\result.docx";

JoinOptions joinOptions = new JoinOptions(1, 2);

Merger merger = new Merger(filePath);
merger.join(filePath2 , joinOptions);
merger.save(filePathOut);

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

VersionRelease Date
24.8August 19, 2024
24.6June 20, 2024
24.2February 20, 2024
23.10October 9, 2023
23.8August 1, 2023
23.2February 23, 2023
22.12December 12, 2022
22.7July 14, 2022
22.2February 16, 2022
21.9January 25, 2022
20.7January 25, 2022
19.2.1January 25, 2022
21.7July 1, 2021
21.3March 26, 2021
20.11November 9, 2020
20.4April 7, 2020
19.12December 24, 2019
19.8August 14, 2019
19.6June 14, 2019
19.2February 26, 2019
18.12December 24, 2018
18.8August 14, 2018