MultiPageLayout Class

Wordize.Saving.MultiPageLayout class. Defines a layout for rendering multiple pages into a single output.

MultiPageLayout class

Defines a layout for rendering multiple pages into a single output.

public sealed class MultiPageLayout

Properties

NameDescription
BackColor { get; set; }Gets or sets the background color of the output. The default is Empty.
BorderColor { get; set; }Gets or sets the color of the pages border. The default is Empty.
BorderWidth { get; set; }Gets or sets the width of the pages border. The default is 0.

Methods

NameDescription
static Grid(int, float, float)Creates a layout in which pages are rendered left-to-right, top-to-bottom, in a grid with the specified number of columns.
static Horizontal(float)Creates a layout in which all specified pages are rendered horizontally side by side, left to right, in a single output.
static SinglePage()Creates a layout that renders only the first of specified pages.
static TiffFrames()Creates a layout where each page is rendered as a separate frame in a multi-frame TIFF image. Applicable only to TIFF image formats.
static Vertical(float)Creates a layout where all specified pages are rendered vertically one below the other in a single output.

Remarks

Use one of the static factory methods to create a layout configuration.

Examples

Shows how to merge several documents using fluent API and save the result as a single image.

ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
imageSaveOptions.PageLayout = MultiPageLayout.Grid(2, 10, 10);
imageSaveOptions.PaperColor = Color.White;
imageSaveOptions.PageLayout.BackColor = Color.Gray;
imageSaveOptions.PageLayout.BorderColor = Color.Black;
imageSaveOptions.PageLayout.BorderWidth = 2;

Merger.Create()
    .From(MyDir + "Merger.docx")
    .From(MyDir + "Merger.doc")
    .From(MyDir + "Merger.rtf")
    .To(ArtifactsDir + "Merger.Grid.png", imageSaveOptions)
    .Execute();

See Also