Indent and Outdent Paragraphs

Hi,

I have looked through the documentation and examples but I have not been able to locate the method for outdenting Paragraphs in a TextFrame. I'd be grateful for a link or quick example of how to do this.

Thanks.

Shaun

Dear Shaun,

In order to indent, you need to set Paragraph.BulletOffset property.

Please see the code below and attached output presentation.

Presentation srcPres = new Presentation();
Slide sld = srcPres.GetSlideByPosition(1);

Aspose.Slides.Rectangle rect = sld.Shapes.AddRectangle(500, 500, 3000, 1);
rect.LineFormat.ShowLines = false;

TextFrame tf = rect.AddTextFrame("This is first line.\rThis is second line.\rThis is third line.");
tf.FitShapeToText = true;

//Indenting first para
Paragraph para = tf.Paragraphs[0];
para.BulletOffset = 150;

//Indenting second para
para = tf.Paragraphs[1];
para.BulletOffset = 250;

//indenting third para
para = tf.Paragraphs[2];
para.BulletOffset = 350;

//write presentation on disk
srcPres.Write(@"c:\outIndenting.ppt");

Thanks! Works perfectly.

If my requirement is to have the bullet symbol indent along with the paragraph, what can i do? Thanks for relpy.

Hi Daizy,

According to what I have perceived from your question, this link may help you in this regard. Please proceed to the said link for further information. If you still feel some problem, please share with us.

Thanks and Regards,