With the new release of GroupDocs.Merger for Java 19.8 you can take your document joining experience to the next level.
What is special about this release?
We are pleased to announce that you can now do image joining. And following are the supported image formats:

  • BMP
  • PNG
  • TIFF

How easy is that?
Let’s understand this with a use-case. We’ll join a BMP and TIFF file.

// For complete examples and data files, please go to https://github.com/GroupDocs-Merger/GroupDocs.Merger-for-Java
// Variables.
string sourcePath = "C:\testfiles\";
long[] sourceFormatArray = {FileFormat.Bmp, FileFormat.Png, FileFormat.Tiff};
int[] rowNumberForElement = {1,2,2};
int[] columnNumberForElement = { 22, 23, 23 };
InputStream[] inputStreams = {new FileInputStream(sourcePath + test.bmp),new FileInputStream(sourcePath + test.png),new FileInputStream(sourcePath + test.tiff)}
int order = Order.JoinByRowsFirst
// Preparing.
java.util.List<ImageJoinItem> imageItems = new ArrayList<ImageJoinItem>();
int i = 0;
for (Long sourceFileFormat : sourceFormatArray)
{
String title = String.format("%s:%s:%s-%s||", order, sourceFileFormat,rowNumberForElement[i],columnNumberForElement[i]);
InputStream imageStream = inputStreams[i];
ImageJoinItem imageJoinItem = new ImageJoinItem(imageStream, sourceFileFormat, rowNumberForElement[i], columnNumberForElement[i], 2);
imageJoinItem.setIdentifyRow(title);
imageItems.add(imageJoinItem);
i++;
}
ImageJoinOptions options = new ImageJoinOptions(outputFileFormat, order);
// Main method.
DocumentInfo resultInfo = new DocumentHandler().getDocumentInfo(documentExample);
view raw joinimages.java hosted with ❤ by GitHub

New Format Support
API now fully supports HTML format.

We’d recommend you to download the latest release and integrate it in your application. In case you find any issue, feel free to post on forum.