GroupDocs.Merger for Java

Merge HTML files

With GroupDocs.Merger for Java, you can build advanced Java applications that seamlessly merge and manage HTML documents.

How to merge HTML documents

GroupDocs.Merger enables seamless merging of HTML documents. Enhance your Java applications by combining multiple files into one.

  1. Provide the path to the first HTML file.
  2. Select the second file to merge.
  3. Configure additional merge options if required.
  4. Execute the merge and save the output file.
// Initialize Merger with the source HTML document
Merger merger = new Merger("file_1.html");

// Merge the document with another file
merger.join("file_2.html");

// Save the merged document to the desired location
merger.save("result.html");
Maven XML
click to copy
copied
More examples Documentation

Document merging tools

GroupDocs.Merger for Java supports over 50 widely used business file formats, offering flexible document manipulation features.

Key features of GroupDocs.Merger

Merge different document formats

Combine PDFs, Word documents, presentations, spreadsheets, images, and more. Customize merge settings by selecting specific pages for processing.

Page manipulation

Rearrange, remove, or swap pages to structure your documents according to your needs.

Adjust page appearance

Rotate pages to any angle and switch between landscape and portrait orientation for supported file formats.

Extract pages

Extract selected pages and save them as a separate document or file.

Merge files of different formats

This example demonstrates how to merge multiple files of supported formats into a single output file.

Java

// Specify the primary file path
Merger merger = new Merger("file_1.pdf");

// Merge it with a Microsoft Word document
merger.join("file_2.docx");

// Add a Microsoft Excel spreadsheet to the result
merger.join("file_3.xlsx");

// Save the merged file to the desired location
merger.save("result.pdf");
Maven XML
click to copy
copied
More examples Documentation

About GroupDocs.Merger

GroupDocs.Merger for Java is a powerful document processing solution that supports over 50 file formats, including PDFs, Word documents, spreadsheets, presentations, images, and archives. Perform operations such as merging, splitting, extracting, reordering, and removing pages with ease.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Merger for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Key features

Explore additional document processing capabilities

Merge various file formats

GroupDocs.Merger supports over 50 file formats, enabling efficient document merging and processing.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English