Click or drag to resize
SectionLayoutMode Enumeration
Specifies the layout mode for a section allowing to define the document grid behavior.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.9
Syntax
public enum SectionLayoutMode
Members
  Member nameValueDescription
Default0 Specifies that no document grid shall be applied to the contents of the corresponding section in the document.
Grid1 Specifies that the corresponding section shall have both the additional line pitch and character pitch added to each line and character within it in order to maintain a specific number of lines per page and characters per line. Characters will not be automatically aligned with gridlines on typing.
LineGrid2 Specifies that the corresponding section shall have additional line pitch added to each line within it in order to maintain the specified number of lines per page.
SnapToChars3 Specifies that the corresponding section shall have both the additional line pitch and character pitch added to each line and character within it in order to maintain a specific number of lines per page and characters per line. Characters will be automatically aligned with gridlines on typing.
Examples
Creates headers and footers different for first, even and odd pages using DocumentBuilder.
[C#]

DocumentBuilder builder = new DocumentBuilder();

PageSetup ps = builder.PageSetup;
ps.DifferentFirstPageHeaderFooter = true;
ps.OddAndEvenPagesHeaderFooter = true;
ps.LayoutMode = SectionLayoutMode.LineGrid;
ps.CharactersPerLine = 1;
ps.LinesPerPage = 1;

builder.MoveToHeaderFooter(HeaderFooterType.HeaderFirst);
builder.Writeln("First page header.");

builder.MoveToHeaderFooter(HeaderFooterType.HeaderEven);
builder.Writeln("Even pages header.");

builder.MoveToHeaderFooter(HeaderFooterType.HeaderPrimary);
builder.Writeln("Odd pages header.");

// Move back to the main story of the first section.
builder.MoveToSection(0);
builder.Writeln("Text page 1.");
builder.InsertBreak(BreakType.PageBreak);
builder.Writeln("Text page 2.");
builder.InsertBreak(BreakType.PageBreak);
builder.Writeln("Text page 3.");

builder.Document.Save(ArtifactsDir + "PageSetup.DifferentHeaders.doc");
See Also