How to Set Paper Orientation for Printing in C#

Paper orientation controls whether a document prints in portrait (tall) or landscape (wide) mode. Portrait works for most letters, invoices, and reports. Landscape is the better choice for wide tables, spreadsheets, dashboards, and presentation slides. Setting orientation programmatically ensures consistent output regardless of the user's default printer configuration.

IronPrint exposes a PaperOrientation property on the PrintSettings class. We set it to Portrait or Landscape, pass the settings to Printer.Print(), and the document prints in the specified layout.

Quickstart: Set Paper Orientation

  1. Install IronPrint via NuGet: Install-Package IronPrint
  2. Add using IronPrint; to the file
  3. Create a PrintSettings object
  4. Set PaperOrientation to Portrait or Landscape
  5. Pass settings to Printer.Print() or Printer.ShowPrintDialog()
  1. Install IronPrint with NuGet Package Manager

    PM > Install-Package IronPrint
  2. Copy and run this code snippet.

    using IronPrint;
    
    // Print a document in landscape orientation
    Printer.Print("report.pdf", new PrintSettings
    {
        PaperOrientation = PaperOrientation.Landscape
    });
  3. Deploy to test on your live environment

    Start using IronPrint in your project today with a free trial

    arrow pointer

How Do I Set Paper Orientation for Printing?

The PaperOrientation property on PrintSettings accepts three values:

  • PaperOrientation.Portrait — vertical layout (default on most printers). Best for single-column documents like letters, contracts, and invoices.
  • PaperOrientation.Landscape — horizontal layout. Best for wide content like data tables, Gantt charts, spreadsheets, and slide decks.
  • PaperOrientation.Automatic — defers to the printer's default setting.

We create a PrintSettings object, assign the desired orientation, and pass it to Printer.Print() for silent printing or Printer.ShowPrintDialog() for dialog-based printing.

:path=/static-assets/print/content-code-examples/how-to/set-paper-orientation/portrait-and-landscape-orientation.cs
using IronPrint;

// Portrait orientation — standard for letters and invoices
var portraitSettings = new PrintSettings
{
    PaperOrientation = PaperOrientation.Portrait
};
Printer.Print("invoice.pdf", portraitSettings);

// Landscape orientation — ideal for wide tables and dashboards
var landscapeSettings = new PrintSettings
{
    PaperOrientation = PaperOrientation.Landscape
};
Printer.Print("quarterly-dashboard.pdf", landscapeSettings);
Imports IronPrint

' Portrait orientation — standard for letters and invoices
Dim portraitSettings As New PrintSettings With {
    .PaperOrientation = PaperOrientation.Portrait
}
Printer.Print("invoice.pdf", portraitSettings)

' Landscape orientation — ideal for wide tables and dashboards
Dim landscapeSettings As New PrintSettings With {
    .PaperOrientation = PaperOrientation.Landscape
}
Printer.Print("quarterly-dashboard.pdf", landscapeSettings)
$vbLabelText   $csharpLabel

With the native .NET System.Drawing.Printing approach, orientation is a boolean (DefaultPageSettings.Landscape = true) buried inside a PrintDocument that also requires PrintPage event handling, graphics rendering, and manual page management. IronPrint replaces that entire pipeline with a single property on a settings object.

How Do I Combine Orientation with Other Print Settings?

Orientation is most useful when combined with paper size, DPI, and margins to define a complete print layout. The PrintSettings class lets us configure all of these in one object.

:path=/static-assets/print/content-code-examples/how-to/set-paper-orientation/combine-orientation-with-settings.cs
using IronPrint;

var settings = new PrintSettings
{
    PaperOrientation = PaperOrientation.Landscape,
    PaperSize = PaperSize.A4,
    Dpi = 300,
    NumberOfCopies = 1,
    PaperMargins = new Margins(15, 15, 15, 15),
    Grayscale = false
};

Printer.Print("financial-report.pdf", settings);
Imports IronPrint

Dim settings As New PrintSettings With {
    .PaperOrientation = PaperOrientation.Landscape,
    .PaperSize = PaperSize.A4,
    .Dpi = 300,
    .NumberOfCopies = 1,
    .PaperMargins = New Margins(15, 15, 15, 15),
    .Grayscale = False
}

Printer.Print("financial-report.pdf", settings)
$vbLabelText   $csharpLabel

PaperSize and PaperOrientation work together — setting A4 landscape gives a 297 × 210 mm print area, while A4 portrait gives 210 × 297 mm. The Dpi property controls output resolution (300 is standard for business documents), and PaperMargins values are in millimeters.

How Do I Let Users Choose Orientation in the Print Dialog?

When we pass PrintSettings to Printer.ShowPrintDialog(), the dialog opens with our preset orientation. The user can accept it or switch between portrait and landscape before printing.

:path=/static-assets/print/content-code-examples/how-to/set-paper-orientation/dialog-with-orientation-preset.cs
using IronPrint;

// Pre-select landscape, but let the user override in the dialog
var settings = new PrintSettings
{
    PaperOrientation = PaperOrientation.Landscape,
    PaperSize = PaperSize.Letter
};

Printer.ShowPrintDialog("wide-report.pdf", settings);
Imports IronPrint

' Pre-select landscape, but let the user override in the dialog
Dim settings As New PrintSettings With {
    .PaperOrientation = PaperOrientation.Landscape,
    .PaperSize = PaperSize.Letter
}

Printer.ShowPrintDialog("wide-report.pdf", settings)
$vbLabelText   $csharpLabel

For non-blocking UI scenarios, the async variant Printer.ShowPrintDialogAsync() accepts the same parameters and keeps the application responsive while the dialog is open. This is especially useful for orientation because users often want to preview how a document looks in portrait versus landscape before committing to a print run. The print document tutorial covers both silent and dialog workflows end to end.

Next Steps

Paper orientation is one property on the PrintSettings object — set PaperOrientation to Portrait, Landscape, or Automatic and pass it to any IronPrint print method. Combine it with PaperSize, Dpi, and PaperMargins for full layout control.

Explore the print settings how-to for every available property, the Printer class API reference for the complete method surface, or the code examples page for ready-to-run snippets. The IronPrint tutorials walk through the full printing lifecycle, and the changelog tracks recent updates including performance improvements.

Start a free 30-day trial to test orientation settings in a live project. When ready, view licensing options starting at $749.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More
Ready to Get Started?
Nuget Downloads 37,845 | Version: 2026.3 just released
Still Scrolling Icon

Still Scrolling?

Want proof fast? PM > Install-Package IronPrint
run a sample watch your document hit the printer.