Click or drag to resize
DropCapPosition Enumeration
Specifies the position for a drop cap text.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.9
Syntax
public enum DropCapPosition
Members
  Member nameValueDescription
None0 The paragraph does not have a drop cap.
Normal1 The drop cap is positioned inside the text margin on the anchor paragraph.
Margin2 The drop cap is positioned outside the text margin on the anchor paragraph.
Examples
Shows how to set the position of a drop cap.
[C#]

// Create a blank document
Document doc = new Document();

// Every paragraph has its own drop cap setting
Paragraph para = doc.FirstSection.Body.FirstParagraph;

// By default, it is "none", for no drop caps
Assert.AreEqual(Aspose.Words.DropCapPosition.None, para.ParagraphFormat.DropCapPosition);

// Move the first capital to outside the text margin
para.ParagraphFormat.DropCapPosition = Aspose.Words.DropCapPosition.Margin;
para.ParagraphFormat.LinesToDrop = 2;

// This text will be affected
para.Runs.Add(new Run(doc, "Hello World!"));

doc.Save(ArtifactsDir + "Paragraph.DropCap.docx");
See Also