Section.PageNumbering Property | Office File API | DevExpress Documentation Skip to main content

Section.PageNumbering Property

Provides access to an object specifying page numbering options for the current section.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v26.1.Core.dll

Declaration

SectionPageNumbering PageNumbering { get; }

Property Value

Example

The following code sample specifies the initial number and NumberingFormat.CardinalText numbering format, and inserts the PAGE field to the section footer.

image

using DevExpress.XtraRichEdit;
using DevExpress.XtraRichEdit.API.Native;

using (var wordProcessor = new RichEditDocumentServer())
{
    wordProcessor.CreateNewDocument();
    Section section = wordProcessor.Document.Sections[0];
    section.PageNumbering.ContinueNumbering = false;
    section.PageNumbering.FirstPageNumber = 3;
    section.PageNumbering.NumberingFormat = NumberingFormat.CardinalText;

    var footer = section.BeginUpdateFooter();
    footer.Fields.Create(footer.Range.End, "PAGE");
    section.EndUpdateFooter(footer);

    wordProcessor.Document.UpdateAllFields();
}
See Also
Use of this site constitutes acceptance of our Website Terms of Use and Privacy Policy (Updated). Cookies Settings