officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-52286699.md
Provides access to the page settings of a section.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
[ComVisible(true)]
public interface SectionPage
<ComVisible(True)>
Public Interface SectionPage
The following members return SectionPage objects:
This class introduces the SectionPage.Height, SectionPage.Width, SectionPage.Landscape and SectionPage.PaperKind properties that specify a section page.
The following code sample specifies page layout settings for the first section of the document: the A6 paper in landscape orientation with the left margin set to two inches.
using DevExpress.XtraRichEdit;
using DevExpress.XtraRichEdit.API.Native;
using DevExpress.Drawing.Printing;
using DevExpress.Utils;
using (var wordProcessor = new RichEditDocumentServer()) {
wordProcessor.LoadDocument("Documents\\Grimm.docx");
Document document = wordProcessor.Document;
document.Sections[0].Page.PaperKind = DXPaperKind.A6;
document.Sections[0].Page.Landscape = true;
document.Sections[0].Margins.Left = Units.InchesToDocumentsF(2.0f);
}
Imports DevExpress.XtraRichEdit
Imports DevExpress.XtraRichEdit.API.Native
Imports DevExpress.Drawing.Printing
Imports DevExpress.Utils
Using wordProcessor = New RichEditDocumentServer()
wordProcessor.LoadDocument("Documents\Grimm.docx")
Dim document As Document = wordProcessor.Document
document.Sections(0).Page.PaperKind = DXPaperKind.A6
document.Sections(0).Page.Landscape = True
document.Sections(0).Margins.Left = Units.InchesToDocumentsF(2.0F)
End Using
See Also