Click or drag to resize
LineNumberRestartMode Enumeration
Determines when automatic line numbering restarts.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.9
public enum LineNumberRestartMode
  Member nameValueDescription
RestartPage0 Line numbering restarts at the start of every page.
RestartSection1 Line numbering restarts at the section start.
Continuous2 Line numbering continuous from the previous section.
Turns on Microsoft Word line numbering for a section.

DocumentBuilder builder = new DocumentBuilder();

PageSetup ps = builder.PageSetup;
ps.LineStartingNumber = 1;
ps.LineNumberCountBy = 5;
ps.LineNumberRestartMode = LineNumberRestartMode.RestartPage;
ps.LineNumberDistanceFromText = 50.0d;

// The line counter will skip any paragraph with this flag set to true

for (int i = 1; i <= 20; i++)
    builder.Writeln(string.Format("Line {0}.", i));

builder.Document.Save(ArtifactsDir + "PageSetup.LineNumbers.docx");
See Also