com.aspose.words
Class Merger

java.lang.Object
    extended by com.aspose.words.Merger

public abstract class Merger 
extends java.lang.Object

Represents a group of methods intended to merge a variety of different types of documents into a single output document.

The specified input and output files or streams, along with the desired merge and save options, are used to merge the given input documents into a single output document.

The merging functionality supports over 35 different file formats.


Method Summary
static voidmerge(java.lang.String outputFile, java.lang.String[] inputFiles)
           Merges the given input documents into a single output document using specified input and output file names.
static voidmerge(java.lang.String outputFile, java.lang.String[] inputFiles, SaveOptions saveOptions, int mergeFormatMode)
           Merges the given input documents into a single output document using specified input output file names and save options.
static voidmerge(java.lang.String outputFile, java.lang.String[] inputFiles, int saveFormat, int mergeFormatMode)
           Merges the given input documents into a single output document using specified input output file names and the final document format.
static Documentmerge(java.lang.String[] inputFiles, int mergeFormatMode)
           Merges the given input documents into a single document and returns Document instance of the final document.
 

Method Detail

merge

public static void merge(java.lang.String outputFile, java.lang.String[] inputFiles)
                      throws java.lang.Exception
Merges the given input documents into a single output document using specified input and output file names.

By default MergeFormatMode.KEEP_SOURCE_FORMATTING is used.

Parameters:
outputFile - The output file name.
inputFiles - The input file names.

merge

public static void merge(java.lang.String outputFile, java.lang.String[] inputFiles, SaveOptions saveOptions, int mergeFormatMode)
                      throws java.lang.Exception
Merges the given input documents into a single output document using specified input output file names and save options.
Parameters:
outputFile - The output file name.
inputFiles - The input file names.
saveOptions - The save options.
mergeFormatMode - A MergeFormatMode value. Specifies how to merge formatting that clashes.

merge

public static void merge(java.lang.String outputFile, java.lang.String[] inputFiles, int saveFormat, int mergeFormatMode)
                      throws java.lang.Exception
Merges the given input documents into a single output document using specified input output file names and the final document format.
Parameters:
outputFile - The output file name.
inputFiles - The input file names.
saveFormat - A SaveFormat value. The save format.
mergeFormatMode - A MergeFormatMode value. Specifies how to merge formatting that clashes.

merge

public static Document merge(java.lang.String[] inputFiles, int mergeFormatMode)
                          throws java.lang.Exception
Merges the given input documents into a single document and returns Document instance of the final document.
Parameters:
inputFiles - The input file names.
mergeFormatMode - A MergeFormatMode value. Specifies how to merge formatting that clashes.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.