GroupDocs.Merger for Java

Join JPEG files

GroupDocs.Merger for Java enables you to develop Java applications that efficiently join multiple JPEG documents.

How to join JPEG documents

GroupDocs.Merger provides an easy way to join JPEG documents. Enhance your Java applications by combining multiple files into one.

  1. Specify the path to the first JPEG file.
  2. Select the second file to join.
  3. Set additional options if necessary.
  4. Join the files and save the output.
// Initialize Merger with the input JPEG document
Merger merger = new Merger("file_frst.jpeg");

// Join the document with another file
merger.join("file_scnd.jpeg");

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

Document joining tools

GroupDocs.Merger for Java supports more than 50 common business file formats, providing a range of document processing features.

Key features of GroupDocs.Merger

Join different document formats

Join documents such as PDFs, Word files, presentations, spreadsheets, images, and more. Specify which pages to include for precise results.

Page management

Easily move, remove, or reorder selected pages to structure your documents as needed.

Adjust page layout

Rotate pages at any angle and switch between landscape and portrait orientations.

Extract specific pages

Select and extract pages from a document, saving them as a separate file.

Join specific pages from different document formats

This example shows how to join JPEG files while selecting specific pages from other formats.

Java

// Specify the main file path
Merger merger = new Merger("file_frst.jpeg");

// Define options for selecting specific pages
PageJoinOptions joinOpt1 = new PageJoinOptions(1, 2);
PageJoinOptions joinOpt2 = new PageJoinOptions(3, 4);

// Join the main document with selected pages from another file
merger.join("file_scnd.docx", joinOpt1);
merger.join("file_thrd.xlsx", joinOpt2);

// Save the joined document to a new location
merger.save("result.jpeg");
Maven XML
click to copy
copied
More examples Documentation

About GroupDocs.Merger

GroupDocs.Merger for Java is a powerful document processing library that supports over 50 file formats, including PDF, Word, Excel, PowerPoint, images, and archives. It allows you to join, split, extract, reorder, and remove pages from documents easily.
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

Discover additional document management capabilities.

Join various file formats

GroupDocs.Merger supports over 50 file formats, making document processing efficient and flexible.

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