GUIDED API LAB
Loading lesson...
The coding workspace is preparing the first ParagraphFormat exercise.
Execution profile
Paragraph selections—
Format assignments—
Document writes—
Ready to tryUse the controls above to interact with this demo.
Server-side document API
Format complete paragraphs
Selection.ParagraphFormat controls layout properties for every paragraph touched by the current selection. The same object handles alignment, distances, indents, frames, backgrounds, and pagination behavior.
Select paragraph content
ServerTextControl.Select(start, length)
Read paragraph settings
ServerTextControl.Selection.ParagraphFormat
Set layout measurements
LeftIndent / RightIndent / LineSpacing / TopDistance / BottomDistance
Control page flow
KeepWithNext / KeepLinesTogether / PageBreakBefore
How the lab executes code
Each run creates a fresh ServerTextControl and loads the same prepared sample content. Submitted statements are parsed against a small allowlist for Select and ParagraphFormat assignments; arbitrary CLR source is never compiled or executed.
Measurements use twips, where 20 twips equal one point. After applying the code, the lab reads the active paragraph state, evaluates the lesson objectives, and renders each generated page as SVG through Page.GetImage.
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4