Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Portrait report with a landscape matrix

Give the main recommendation a normal reading page while reserving a wider page for evidence that would be cramped in portrait.

Start with
Evaluation narrative and a five-column evidence matrix
Generate
DOCX + PDF
Generated Word example: Portrait report with a landscape matrix
Page 1 · Generated by the example below

How it works

  1. Write the narrative first

    Use heading styles and a short list for the decision, evaluation approach and recommendation.

  2. Start a landscape section

    Add a section and set its PageOrientation to Landscape before building the comparison matrix.

  3. Size the evidence columns

    Use percentage widths to reserve room for longer observations, emphasize the header and add cell padding.

The rest of the document

Portrait report with a landscape matrix: Page 2
Page 2

The C# source

This is the complete example file used to generate the download. The walkthrough runner creates the output directory and produces the additional previews.

using OfficeIMO.Drawing;
using OfficeIMO.Word;

namespace OfficeIMO.Examples.Showcase.Workflows;

/// <summary>Keeps the narrative portrait and places a wide decision matrix in its own landscape section.</summary>
internal static class MixedOrientationReport {
    internal static void Create(string folder) {
        using WordDocument document = WordDocument.Create(Path.Combine(folder, "example.docx"));
        document.Settings.FontFamily = "Carlito";
        document.Settings.FontSize = 11;
        document.AddParagraph("Supplier evaluation").Style = WordParagraphStyles.Heading1;
        document.AddParagraph("NORTHWIND / PROCUREMENT / ILLUSTRATIVE OPTIONS");
        document.AddParagraph("Decision to make").Style = WordParagraphStyles.Heading2;
        document.AddParagraph("Choose a support platform for a 25-person operations team. The selected service must support clear ownership, exportable records and a tested recovery process.");
        document.AddParagraph("Evaluation approach").Style = WordParagraphStyles.Heading2;
        var list = document.AddList(WordListStyle.Bulleted);
        list.AddItem("Demonstrate the same request journey with every supplier.");
        list.AddItem("Record evidence separately from claims made during the demonstration.");
        list.AddItem("Keep unresolved questions visible before signing.");
        document.AddParagraph("Recommendation").Style = WordParagraphStyles.Heading2;
        document.AddParagraph("Take Cedar to a controlled pilot. Confirm export completeness and escalation coverage before making a final selection.");
        var section = document.AddSection();
        section.PageOrientation = OfficePageOrientation.Landscape;
        document.AddParagraph("Evidence comparison").Style = WordParagraphStyles.Heading1;
        document.AddParagraph("A landscape section gives each criterion enough room for a useful explanation.");
        string[,] rows = {
            { "Option", "Request ownership", "Data export", "Recovery evidence", "Commercial question" },
            { "Cedar", "Named owner and queue history shown", "CSV and attachment export demonstrated", "Restore exercise supplied", "Confirm support response window" },
            { "Birch", "Queue ownership shown; individual handoff unclear", "CSV shown; attachments untested", "Procedure supplied; exercise pending", "Confirm annual uplift" },
            { "Maple", "Ownership and escalation demonstrated", "Full export pending pilot", "Restore exercise supplied", "Confirm exit assistance" }
        };
        var table = document.AddTable(4, 5, WordTableStyle.TableGrid);
        table.SetWidthPercentage(100);
        table.SetColumnWidthsPercentage(12, 24, 22, 22, 20);
        for (int row = 0; row < 4; row++) for (int column = 0; column < 5; column++) {
            var cell = table.Rows[row].Cells[column];
            cell.Paragraphs[0].Text = rows[row, column];
            cell.Paragraphs[0].Bold = row == 0;
            cell.MarginTopCentimeters = cell.MarginBottomCentimeters = 0.15;
            if (row == 0) cell.ShadingFillColorHex = "E8EEF8";
        }
        foreach (var paragraph in document.Paragraphs) {
            paragraph.FontFamily = "Carlito";
            paragraph.FontSize = paragraph.Style == WordParagraphStyles.Heading1 ? 26 : paragraph.Style == WordParagraphStyles.Heading2 ? 15 : 11;
            paragraph.LineSpacingAfterPoints = 9;
        }
        document.Save();
    }
}
Open the C# source file

Run it from the source checkout

Clone the OfficeIMO repository and run this command from its root with the .NET 10 SDK. The first run restores the example project's dependencies.

dotnet run --project OfficeIMO.Examples -f net10.0 -- --showcase-workflows --showcase-example word-mixed-orientation-report

The files are written to OfficeIMO.Examples/bin/Debug/net10.0/Documents/Workflows/word-mixed-orientation-report/. To use the example in your application, start with the Word guide and its package setup.

Downloads and scope

What the preview shows

The linked C# example generates this file. The runner reopens and validates the DOCX, exports a PDF, and renders every PDF page for review.

What to keep in mind

The source and PDF demonstrate mixed page orientation. The sample comparison is illustrative and is not an endorsement of a supplier.

Word API reference · Artifact hashes and provenance

Continue with another example

Example source

Download source