Overloads
AddSection()
Creates and adds a new section to the document.
AddSection(IDocumentSection documentSection)
Adds the supplied section to the document.
AddSection()
IDocumentSection AddSection()Creates and adds a new section to the document.
Remarks
Sections are major structural divisions in a document. Each section can have its own page settings, headers, footers, and column layout.
AddSection(IDocumentSection documentSection)
IDocumentSection AddSection(IDocumentSection documentSection)Adds the supplied section to the document.
Parameters
- documentSection
- The section instance to add.
Examples
csharp
1var doc = new VDocs();
2
3// Add a section with custom page settings
4var section = doc.AddSection();
5section.PageSettings.Orientation = Orientation.Landscape;
6section.AddParagraph().AddText("This section is in landscape orientation.");
7
8// Add another section
9var section2 = doc.AddSection();
10section2.PageSettings.Orientation = Orientation.Portrait;
11section2.AddParagraph().AddText("This section is in portrait orientation.");
12