VegaRise.NET
Back to VDocs

AddSectionMethod

Definition

Namespace
DOM
Assembly
VDocs.dll

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.

Returns

IDocumentSection

The newly added instance. IDocumentSection

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.

Returns

IDocumentSection

The added instance. IDocumentSection

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
VegaRise.NET

Sign In

Welcome back. Please sign in to your account.

Forgot password?
or

Don't have an account? Create an account

By signing in, you agree to our Terms of Service and Privacy Policy.