com.aspose.words
Class BaselineAlignment

java.lang.Object
    extended by com.aspose.words.BaselineAlignment

public class BaselineAlignment 
extends java.lang.Object

Utility class containing constants. Specifies fonts vertical position on a line.

Example:

Shows how to set fonts vertical position on a line.
Document doc = new Document(getMyDir() + "Office math.docx");

ParagraphFormat format = doc.getFirstSection().getBody().getParagraphs().get(0).getParagraphFormat();
if (format.getBaselineAlignment() == BaselineAlignment.AUTO)
{
    format.setBaselineAlignment(BaselineAlignment.TOP);
}

doc.save(getArtifactsDir() + "ParagraphFormat.ParagraphBaselineAlignment.docx");

Field Summary
static final intTOP = 0
           Aligns along the top of each font.
static final intCENTER = 1
           Aligns the center points of each font.
static final intBASELINE = 2
           Aligns to the baseline of the paragraph.
static final intBOTTOM = 3
           Aligns to the bottom of each font.
static final intAUTO = 4
           Baseline is adjusted automatically.
 

Field Detail

TOP = 0

public static final int TOP
Aligns along the top of each font.

CENTER = 1

public static final int CENTER
Aligns the center points of each font.

BASELINE = 2

public static final int BASELINE
Aligns to the baseline of the paragraph.

BOTTOM = 3

public static final int BOTTOM
Aligns to the bottom of each font.

AUTO = 4

public static final int AUTO
Baseline is adjusted automatically.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.