Created
August 19, 2019 13:42
-
-
Save GroupDocsGists/d03aba45762a74c410ee10e0e4fa1a05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment