windowsforms-devexpress-dot-xtraprinting-f8709359.md
Provides functionality to print reports.
Namespace : DevExpress.XtraPrinting
Assembly : DevExpress.XtraPrinting.v25.2.dll
NuGet Package : DevExpress.Win.Printing
public class XtraPageSettings :
XtraPageSettingsBase
Public Class XtraPageSettings
Inherits XtraPageSettingsBase
The following members return XtraPageSettings objects:
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.
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.
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;
Imports System.Drawing.Printing
Imports DevExpress.XtraPrinting
' ...
' Create an XtraPageSettings instance.
Dim pageSettings As XtraPageSettings = 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
Object XtraPageSettingsBase XtraPageSettings
See Also