Merger.MergeToImages

Merger MergeToImages method. Merges the given input documents into a single output document using specified input output file names and save options. Renders the output to images.

MergeToImages(string[], ImageSaveOptionsMergeFormatMode)

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)
ParameterTypeDescription
inputFilesString[]The input file names.
saveOptionsImageSaveOptionsThe save options.
mergeFormatModeMergeFormatModeSpecifies how to merge formatting that clashes.

Examples

Shows how to merge several PDF documents and save the result to image streams.

string[] inputFiles = new string[] { MyDir + "Merger.pdf", MyDir + "Merger1.pdf", MyDir + "Merger2.pdf" };

Stream[] pages = Merger.MergeToImages(inputFiles, new ImageSaveOptions(SaveFormat.Png), MergeFormatMode.KeepSourceLayout);

See Also


MergeToImages(Stream[], ImageSaveOptionsMergeFormatMode)

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)
ParameterTypeDescription
inputStreamsStream[]The input file streams.
saveOptionsImageSaveOptionsThe save options.
mergeFormatModeMergeFormatModeSpecifies how to merge formatting that clashes.

Examples

Shows how to merge several documents loaded from streams and save the result to image streams.

Stream[] inputStreams = new Stream[]
{
    new MemoryStream(File.ReadAllBytes(MyDir + "Merger.docx")),
    new MemoryStream(File.ReadAllBytes(MyDir + "Merger.doc")),
    new MemoryStream(File.ReadAllBytes(MyDir + "Merger.rtf"))
};

Stream[] pages = Merger.MergeToImages(inputStreams, new ImageSaveOptions(SaveFormat.Png), MergeFormatMode.KeepSourceLayout);

See Also