We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Indent Issue

We have indent issue in PPTX when we use Aspose.Slide Version 5.5.0.0. This version removes indent space below the bullet. It was working file with Aspose.Slide Version 5.0.1.0. Please find attached output from the two different version. Please let us know the solution ASAP because we have this code (5.5.0.0) in UAT and will move to production very soon.

Hi Rakesh,


I would recommend you to please try using Aspose.Slides for .NET 5.7.0, which is the latest available version. If the issue still persisits then please share the complete scenario that you are using to generate the presentation on your end that is exhibiting the issue. We will request the sample project code and generated presentation for our further investigation and reproducing the issue on end.

Many Thanks,

Indent issue is still there with 5.7.0 version.


Below is the code snippet to set the bullet style for PPTX.
private void SetBulletsStyle(ParagraphEx currentPara)
{
currentPara.BulletHeight = 100.0F;
currentPara.DefaultTabSize = 72.0F;
currentPara.EastAsianLineBreak = NullableBool.True;
currentPara.FontAlignment = FontAlignmentEx.Baseline;
currentPara.HangingPunctuation = NullableBool.True;
currentPara.Indent = -14.0F;
currentPara.SpaceAfter = -4.0F;

float fltMarginLeft = (36.0F * intBulletLevel) - 22.0F;
currentPara.MarginLeft = fltMarginLeft;
}

Hi Rakesh,


Please use the code snippet given below for setting the margins and bullets indent for the text frame text inside PPTX shapes. Please share if I may help you further in this regard.

PresentationEx pres = new PresentationEx();

//Accessing first slide
SlideEx slide = pres.Slides[0];
slide.Shapes.AddAutoShape(ShapeTypeEx.Rectangle, 0, 0, 500, 100);
slide.Shapes.AddAutoShape(ShapeTypeEx.Rectangle, 0, 305, 500, 100);

//Accessing the first and second placeholder in the slide and typecasting it as AutoShape
TextFrameEx tf1 = ((AutoShapeEx)slide.Shapes[0]).TextFrame;
TextFrameEx tf2 = ((AutoShapeEx)slide.Shapes[1]).TextFrame;

//Change the text in both placeholders
tf1.Text = “Margin by Aspose Margin by Aspose Margin by Aspose Margin by Aspose”;
tf2.Text = “Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose”;
//Getting the first paragraph of the placeholders
ParagraphEx para1 = tf1.Paragraphs[0];
ParagraphEx para2 = tf2.Paragraphs[0];
para2.BulletType = BulletTypeEx.Numbered;
ParagraphEx para3 = new ParagraphEx();
para3.BulletType = BulletTypeEx.Numbered;
para3.Indent = 144;
para3.Alignment = TextAlignmentEx.Center;
para3.Text = “Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose”;
tf2.Paragraphs.Add(para3);
para1.MarginLeft = 72;
para2.Indent=144;
// para3.MarginLeft = 72;
float Par1Margin = para1.MarginLeft;
//Writing the presentation as a PPTX file
pres.Write(“d:\MarginIndentAlign.pptx”);

Many Thanks,

This code has still indent issue. Can you please add some more text for para3? I haven’t changed single line of your code and see same issue.


Please add more text for para3 and test your code.


para3.Text = “Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose”;


Can you please confirm that this is a defect in 5.5.0.0 and 5.7.0.1 version? Please let us know about time frame to fix this issue so I can communicate accordingly. We need a release notes for newer version DLL (from 5.5.0.0. to {new version}).

Thanks,
Rakesh


I got a root cause for this issue and this is due to one Aspose Slide property called "ParagraphEx.HangingPunctuation". This issue has been logged by someone else also. Please refer given URL for more detail

<a href="https://forum.aspose.com/t/86199</a></div><div><br></div><div>We are also using "ParagraphEx.HangingPunctuation" to set spaces between bullets and paragraph.
Issue Taking # 28415

This issue was posted in 5.3.0 release and that version was released before 5 months. We can't proceed with current version for deployment in production. Please let us know the exact date when you are going to fix this issue so I can arrange my production deployment accordingly.

Rakesh

Hi Rakesh,


I have worked with the requirements shared by you and have been able to generate the code snippet that may prove workable for you. Please use the code snippet given below to serve the purpose. I have also shared the generated presentation for your further kind reference.

PresentationEx pres = new PresentationEx();

//Accessing first slide
SlideEx slide = pres.Slides[0];
slide.Shapes.AddAutoShape(ShapeTypeEx.Rectangle, 0, 205, 500, 300);

//Accessing the first and second placeholder in the slide and typecasting it as AutoShape
TextFrameEx tf = ((AutoShapeEx)slide.Shapes[0]).TextFrame;

//Change the text in both placeholders
tf.Text = “Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose”;
//Getting the first paragraph of the placeholders
ParagraphEx para1 = tf.Paragraphs[0];
para1.BulletType = BulletTypeEx.Numbered;
ParagraphEx para2 = new ParagraphEx();
para2.BulletType = BulletTypeEx.Numbered;
para2.Alignment = TextAlignmentEx.Center;
para2.Text = “Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose Indent by Aspose”;
para1.ParagraphFormat.MarginLeft = 50;
para2.ParagraphFormat.MarginLeft = 50;

para1.ParagraphFormat.Indent = 20;
para2.ParagraphFormat.Indent = 20;

para1.ParagraphFormat.HangingPunctuation = NullableBool.True;
para2.ParagraphFormat.HangingPunctuation = NullableBool.True;
tf.Paragraphs.Add(para2);

//Writing the presentation as a PPTX file
pres.Write(“d:\MarginIndentAlign.pptx”);

Many Thanks,

I think there may be an issue that remains with the special indentation in Aspose.Slides (at least for .NET – confirmed in 5.8.0):

If you clone a slide that has text with the special hanging line spacing and the paragraph is in a table, depending on the position in the table and the line spacing for the whole paragraph, it may or may not remove the hanging special… I have attached a working example pptx (AsposeTestIndent97.pptx) for testing.

The slide was composed using PowerPoint 2010, saved and then the first slide was cloned using the following lines:

PresentationEx pres = new PresentationEx§;
pres.Slides.InsertClone(0, pres.Slides[0]);
pres.Save(@“c:\AsposeTestIndent97.pptx”, SaveFormat.Pptx);

if you flip between slide 1 and slide 0, the shifting text will reveal the issue.

In the generated openXML doc, the paragraph indent sign is actually getting flipped – between positive and negative (though I don’t know if this is something you manipulate directly):




Hope this helps to identify and fix this issue once and for all…

Chadwick Posey




Hi Chadwick,


I have worked with the presentation file shared by you and have been able to observe the issue shared by you. An issue with ID SLIDESNET-33118 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue is resolved.

We are sorry for your inconvenience,

Thank you Mudassir,

Do you have an updated status on this bug or know if this will be fixed in the next monthly build?

Thanks
Chadwick

Hi Chadwick,

I have verified from our issue tracking system and like to share that the issue shared has not yet been resolved. I have requested our development team to schedule the issue. I will share the information with you as soon as the issue is resolved.

We are sorry for your inconvenience,

Thank you Mudassir for your earlier reply. Has the issue been scheduled yet? We are still stuck in the 4.x version until this can get resolved…

Thanks
Chadwick

Hi
Chadwick,


I have verified from our development team and like to share that the issue will be fixed in Aspose.Slides for .NET 6.1.0, which is scheduled for delivery on 20 March, 2012. We will share the further information with you once the issue will be resolved.

Many Thanks,

The issues you have found earlier (filed as SLIDESNET-33118) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.