Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

XtraPageSettings Class

Provides functionality to print reports.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.XtraPrinting.v24.2.dll

NuGet Package: DevExpress.Win.Printing

#Declaration

public class XtraPageSettings :
    XtraPageSettingsBase

The following members return XtraPageSettings objects:

#Remarks

The XtraPageSettingsBase.TopMargin, XtraPageSettingsBase.RightMargin, XtraPageSettingsBase.BottomMargin and XtraPageSettingsBase.LeftMargin properties determine the top, right, bottom and left report page margins accordingly.

The XtraPageSettingsBase.Landscape property determines report page orientation (landscape if true, portrait if false). The XtraPageSettingsBase.PaperKind property determines the Paper Kind. All these settings are grouped in the Page Setup dialog shown below.

Page Setup Dialog

For more information on paper kinds refer to MSDN.

Alternatively, you can change margins by clicking them within the report page and dragging to the right, left, top or bottom.

#Example

This example demonstrates how to use the XtraPageSettings class.

using System.Drawing.Printing;
using DevExpress.XtraPrinting;
// ...

// Create an XtraPageSettings instance.
XtraPageSettings pageSettings = printingSystem1.PageSettings;

// Specify the paper kind and page orientation.
pageSettings.PaperKind = PaperKind.Letter;
pageSettings.Landscape = true;

// Specify margins.
pageSettings.LeftMargin = 20;
pageSettings.RightMargin = 20;
pageSettings.TopMargin = 20;
pageSettings.BottomMargin = 20;

#Inheritance

See Also