BaselineAlignment

BaselineAlignment enumeration

Specifies fonts vertical position on a line.

public enum BaselineAlignment

Values

NameValueDescription
Top0Aligns along the top of each font.
Center1Aligns the center points of each font.
Baseline2Aligns to the baseline of the paragraph.
Bottom3Aligns to the bottom of each font.
Auto4Baseline is adjusted automatically.

Examples

Shows how to set fonts vertical position on a line.

Document doc = new Document(MyDir + "Office math.docx");

ParagraphFormat format = doc.FirstSection.Body.Paragraphs[0].ParagraphFormat;
if (format.BaselineAlignment == BaselineAlignment.Auto)
{                
    format.BaselineAlignment = BaselineAlignment.Top;
}

doc.Save(ArtifactsDir + "ParagraphFormat.ParagraphBaselineAlignment.docx");

See Also