Class Merger
Namespace: Aspose.Words.LowCode
Assembly: Aspose.Words.dll (25.8.0)
Represents a group of methods intended to merge a variety of different types of documents into a single output document.
public class Merger : ProcessorInheritance
Inherited Members
Processor.mResultDocument , Processor.From(string, LoadOptions) , Processor.From(Stream, LoadOptions) , Processor.To(string, SaveOptions) , Processor.To(string, SaveFormat) , Processor.To(Stream, SaveOptions) , Processor.To(Stream, SaveFormat) , Processor.To(List<stream>, SaveOptions) , Processor.To(List<stream>, SaveFormat) , Processor.Execute() , Processor.ExecuteCore() , Processor.CheckArgumentsSet() , Processor.GetPartFileName(string, int, SaveFormat) , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Remarks
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.
Methods
Create()
Creates new instance of the mail merger processor.
public static Merger Create()Returns
Create(MergerContext)
Creates new instance of the mail merger processor.
public static Merger Create(MergerContext context)Parameters
context MergerContext
Returns
ExecuteCore()
protected override void ExecuteCore()Merge(string, string[])
Merges the given input documents into a single output document using specified input and output file names using Aspose.Words.LowCode.MergeFormatMode.KeepSourceFormatting.
public static void Merge(string outputFile, string[] inputFiles)Parameters
outputFile string
The output file name.
inputFiles string
[]
The input file names.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Merge(string, string[], SaveFormat, MergeFormatMode)
Merges the given input documents into a single output document using specified input output file names and the final document format.
public static void Merge(string outputFile, string[] inputFiles, SaveFormat saveFormat, MergeFormatMode mergeFormatMode)Parameters
outputFile string
The output file name.
inputFiles string
[]
The input file names.
saveFormat SaveFormat
The save format.
mergeFormatMode MergeFormatMode
Specifies how to merge formatting that clashes.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Merge(string, string[], SaveOptions, MergeFormatMode)
Merges the given input documents into a single output document using specified input output file names and save options.
public static void Merge(string outputFile, string[] inputFiles, SaveOptions saveOptions, MergeFormatMode mergeFormatMode)Parameters
outputFile string
The output file name.
inputFiles string
[]
The input file names.
saveOptions SaveOptions
The save options.
mergeFormatMode MergeFormatMode
Specifies how to merge formatting that clashes.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Merge(string, string[], LoadOptions[], SaveOptions, MergeFormatMode)
Merges the given input documents into a single output document using specified input output file names and save options.
public static void Merge(string outputFile, string[] inputFiles, LoadOptions[] loadOptions, SaveOptions saveOptions, MergeFormatMode mergeFormatMode)Parameters
outputFile string
The output file name.
inputFiles string
[]
The input file names.
loadOptions LoadOptions
[]
Load options for the input files.
saveOptions SaveOptions
The save options.
mergeFormatMode MergeFormatMode
Specifies how to merge formatting that clashes.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), each page of the output will be saved as a separate file. The specified output file name will be used to generate file names for each part following the rule: outputFile_partIndex.extension.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF file.
Merge(string[], MergeFormatMode)
Merges the given input documents into a single document and returns Aspose.Words.Document instance of the final document.
public static Document Merge(string[] inputFiles, MergeFormatMode mergeFormatMode)Parameters
inputFiles string
[]
The input file names.
mergeFormatMode MergeFormatMode
Specifies how to merge formatting that clashes.
Returns
Merge(string[], LoadOptions[], MergeFormatMode)
Merges the given input documents into a single document and returns Aspose.Words.Document instance of the final document.
public static Document Merge(string[] inputFiles, LoadOptions[] loadOptions, MergeFormatMode mergeFormatMode)Parameters
inputFiles string
[]
The input file names.
loadOptions LoadOptions
[]
Load options for the input files.
mergeFormatMode MergeFormatMode
Specifies how to merge formatting that clashes.
Returns
Merge(Document[], MergeFormatMode)
Merges the given input documents into a single document and returns Aspose.Words.Document instance of the final document.
public static Document Merge(Document[] inputDocuments, MergeFormatMode mergeFormatMode)Parameters
inputDocuments Document
[]
The input documents.
mergeFormatMode MergeFormatMode
Specifies how to merge formatting that clashes.
Returns
Merge(Stream, Stream[], SaveFormat)
Merges the given input documents into a single output document using specified input output streams and the final document format.
public static void Merge(Stream outputStream, Stream[] inputStreams, SaveFormat saveFormat)Parameters
outputStream Stream
The output stream.
inputStreams Stream
[]
The input streams.
saveFormat SaveFormat
The save format.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
Merge(Stream, Stream[], SaveOptions, MergeFormatMode)
Merges the given input documents into a single output document using specified input output streams and save options.
public static void Merge(Stream outputStream, Stream[] inputStreams, SaveOptions saveOptions, MergeFormatMode mergeFormatMode)Parameters
outputStream Stream
The output stream.
inputStreams Stream
[]
The input streams.
saveOptions SaveOptions
The save options.
mergeFormatMode MergeFormatMode
Specifies how to merge formatting that clashes.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
Merge(Stream, Stream[], LoadOptions[], SaveOptions, MergeFormatMode)
Merges the given input documents into a single output document using specified input output streams and save options.
public static void Merge(Stream outputStream, Stream[] inputStreams, LoadOptions[] loadOptions, SaveOptions saveOptions, MergeFormatMode mergeFormatMode)Parameters
outputStream Stream
The output stream.
inputStreams Stream
[]
The input streams.
loadOptions LoadOptions
[]
Load options for the input files.
saveOptions SaveOptions
The save options.
mergeFormatMode MergeFormatMode
Specifies how to merge formatting that clashes.
Remarks
If the output format is an image (BMP, EMF, EPS, GIF, JPEG, PNG, or WebP), only the first page of the output will be saved to the specified stream.
If the output format is TIFF, the output will be saved as a single multi-frame TIFF to the specified stream.
Merge(Stream[], MergeFormatMode)
Merges the given input documents into a single document and returns Aspose.Words.Document instance of the final document.
public static Document Merge(Stream[] inputStreams, MergeFormatMode mergeFormatMode)Parameters
inputStreams Stream
[]
The input streams.
mergeFormatMode MergeFormatMode
Specifies how to merge formatting that clashes.
Returns
Merge(Stream[], LoadOptions[], MergeFormatMode)
Merges the given input documents into a single document and returns Aspose.Words.Document instance of the final document.
public static Document Merge(Stream[] inputStreams, LoadOptions[] loadOptions, MergeFormatMode mergeFormatMode)Parameters
inputStreams Stream
[]
The input streams.
loadOptions LoadOptions
[]
Load options for the input files.
mergeFormatMode MergeFormatMode
Specifies how to merge formatting that clashes.
Returns
MergeToImages(string[], ImageSaveOptions, MergeFormatMode)
Merges the given input documents into a single output document using specified input output file names and save options. Renders the output to images.
public static Stream[] MergeToImages(string[] inputFiles, ImageSaveOptions saveOptions, MergeFormatMode mergeFormatMode)Parameters
inputFiles string
[]
The input file names.
saveOptions ImageSaveOptions
The save options.
mergeFormatMode MergeFormatMode
Specifies how to merge formatting that clashes.
Returns
Stream []
MergeToImages(Stream[], ImageSaveOptions, MergeFormatMode)
Merges the given input document streams into a single output document using specified image save options. Renders the output to images.
public static Stream[] MergeToImages(Stream[] inputStreams, ImageSaveOptions saveOptions, MergeFormatMode mergeFormatMode)Parameters
inputStreams Stream
[]
The input file streams.
saveOptions ImageSaveOptions
The save options.
mergeFormatMode MergeFormatMode
Specifies how to merge formatting that clashes.
Returns
Stream [] </stream></stream>