public class DropCapPosition
Example:
// Create a blank document
Document doc = new Document();
// Every paragraph has its own drop cap setting
Paragraph para = doc.getFirstSection().getBody().getFirstParagraph();
// By default, it is "none", for no drop caps
Assert.assertEquals(para.getParagraphFormat().getDropCapPosition(), com.aspose.words.DropCapPosition.NONE);
// Move the first capital to outside the text margin
para.getParagraphFormat().setDropCapPosition(com.aspose.words.DropCapPosition.MARGIN);
para.getParagraphFormat().setLinesToDrop(2);
// This text will be affected
para.getRuns().add(new Run(doc, "Hello World!"));
doc.save(getArtifactsDir() + "Paragraph.DropCap.docx");
Field Summary | ||
---|---|---|
static final int | NONE | |
The paragraph does not have a drop cap.
|
||
static final int | NORMAL | |
The drop cap is positioned inside the text margin on the anchor paragraph.
|
||
static final int | MARGIN | |
The drop cap is positioned outside the text margin on the anchor paragraph.
|
public static final int NONE
public static final int NORMAL
public static final int MARGIN