LayoutOptions.ContinuousSectionPageNumberingRestart

LayoutOptions ContinuousSectionPageNumberingRestart property. Gets or sets the mode of behavior for computing page numbers when a continuous section restarts the page numbering.

LayoutOptions.ContinuousSectionPageNumberingRestart property

Gets or sets the mode of behavior for computing page numbers when a continuous section restarts the page numbering.

public ContinuousSectionRestart ContinuousSectionPageNumberingRestart { get; set; }

Remarks

The default value is Always. It matches the behavior of MS Word 2019 which was the latest version at the moment the option was introduced. Older page numbering logic demonstrated by MS Word 2016 is available via this option. Please ContinuousSectionRestart for the behavior description.

Examples

Shows how to control page numbering in a continuous section.

ConverterContext context = new ConverterContext();

// By default Wordize behavior matches the Microsoft Word 2019.
// If you need old behavior, repetitive to Microsoft Word 2016, use 'ContinuousSectionRestart.FromNewPageOnly'.
// Page numbering restarts only if there is no other content before the section on the page where the section starts,
// because of that the numbering will reset to 2 from the second page.
context.LayoutOptions.ContinuousSectionPageNumberingRestart = Layout.ContinuousSectionRestart.FromNewPageOnly;

Converter.Create(context)
    .From(MyDir + "Simple.docx")
    .To(ArtifactsDir + "LayoutOptions.ContinuousSectionPageNumberingRestart.pdf")
    .Execute();

See Also