ParagraphFormat Indentation and Spacing

When I set a value for Indent it only applies to the First Line. HangingPunction seems to have no effect. And I cannot seem to find how to set the Indentation Before text.

In Spacing (specifically SpaceAfter), how does the float value convert to points? I am trying to set it to 6pt. When I set the float value to any value between 34.5 and 35.49 the SpaceAfter becomes 5.88pt. When I set the float value to any value between 35.5 and 36.49 the SpaceAfter becomes 6.05pt.

Hi Patrick,


I have observed your requirement and regret to share that the Hanging punctuation seems to have some issue while setting. I have created an issue with ID SLIDESNET-36317 in our issue tracking system to further investigate and resolve the Hanging bullet issue. In order to cater your requirement, I request you to please try using the following sample code to serve the purpose on your end. I hope this will be helpful.


public static void TestHanging()
{
Presentation pres=new Presentation();
ISlide slide=pres.Slides[0];

IAutoShape ashp=slide.Shapes.AddAutoShape(ShapeType.Rectangle,50,50,300,300);

ashp.AddTextFrame("");

//int paragraphID = ashp.TextFrame.Paragraphs.Add(new Paragraph());
IParagraph paragraph = ashp.TextFrame.Paragraphs[0];

// paragraph.Portions.Add(new PortionEx());
paragraph.Portions[0].Text=“Here is a very long text, Here is a very long text, Here is a very long text, Here is a very long text, Here is a very long text, Here is a very long text, Here is a very long text, Here is a very long text, Here is a very long text,”;

paragraph.ParagraphFormat.Bullet.Type = BulletType.Symbol;

// paragraph.ParagraphFormat.Bullet.Char = ‘\u25A0’;
paragraph.ParagraphFormat.Bullet.Char = ‘\u27A2’;
paragraph.ParagraphFormat.Indent = -20;
paragraph.ParagraphFormat.MarginLeft = 50;
paragraph.ParagraphFormat.Alignment = TextAlignment.Justify;
paragraph.ParagraphFormat.HangingPunctuation = NullableBool.True;
pres.Save(“D:\Aspose Data\Hanging.pptx”, SaveFormat.Pptx);
}

Many Thanks,