Bullets - Paragraph allignment (hanging)

Hi,
I have run the attached code (taken from the Aspose documentation for Managing Paragraph Bullets in PPTX), setting the “hanging punctuation” to “true” for the Paragraph.
I would have expected the paragraph to be aligned as “hanging” in the bullet list, but instead it is aligned as “first line”,for all the lines in the paragraph, which is incorrect. In a “hanging” alignment, the paragraph’s text keeps the same distance from the bullet for all the lines and does not go under the bullet.
Please have a look also at the attached screenshot and advise how can the paragraph be aligned as “hanging”?

Thanks!

Hi MAM,


I have worked with the requirements shared by you and have been able to reproduce the issue. An issue with ID SLIDESJAVA-33308 has already been created in our issue tracking system to further investigate and resolve this issue. However, I have not observed this issue in Aspose.Slides for .NET, so it is highly likely that this issue will be resolved in first auto ported version of Aspose.Slides for Java 3.0.0 automatically that is due for release by end of August 2012. I will share the further information with you as soon as it will be available.

Many Thanks,

Hi Mudassir,

Thanks a lot for support! Unfortunately time presses us,as we have to use this feature on one of our projects. Would there be any possibility to give us a workaround for this issue? It is pretty important for our project.


Thank you very much in advance, your information would be greatly appreciated.

Best regards,
MAM

Hi MAM,


I like to share that I have shared the issue with our development team today and have requested them as well to schedule the issue for investigation and resolution. I can understand the sense of urgency on your end but I assure you that we try our best to resolve the issues as soon as possible.

Many Thanks,

Thanks a lot!

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


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

Hi Mudassir,

I was happy to hear that bug was fixed with aspose.slides 2.9.5. However, I’m not able to set the hanging punctuation. I use following code. Do I miss something?

    File pptxOutputFile = new File("HangingPunctuation.pptx");


PresentationEx presentation = new PresentationEx();

SlideEx slide = presentation.getSlides().get(0);

int idx = slide.getShapes().addAutoShape(ShapeTypeEx.RECTANGLE, 10, 20, 300, 500);

TextFrameEx tf = ((AutoShapeEx)slide.getShapes().get(idx)).getTextFrame();
tf.getParagraphs().remove(0);

ParagraphEx para = new ParagraphEx();

para.setBulletType(BulletTypeEx.SYMBOL);
para.setBulletChar(‘®’);

para.setIndent(20.0f);

para.setMarginLeft(20.0f);

para.setText(“this is a very long test which should break and show the hanging punctuation”);

para.setHangingPunctuation(NullableBool.TRUE);

tf.getParagraphs().add(para);

presentation.save(new FileOutputStream(pptxOutputFile), SaveFormat.PPTX);



Thank you for Help
Marco

Hi Marco,


Please try setting the indent value in negative. Please use following code snippet for setting indent.

para.setIndent(-20.0f);

Many Thanks,

Hi Mudassir,



Thank you a lot for the fast response. This did the trick. But why has indent to be set negative? I just wonder because in PowerPoint there the value seems to be set positive in the end. Is there some documentation about the concept of margins and indents which I could read?



Thank you

Marco

Hi Marco,


That is really appreciable that things worked on your end. Actually, if you observe that value negative indent value is set in relation to paragraph text position in Aspose.Slides. When you set it negative, the paragraph text remains there but bullet character is moved to left. Hence giving the look of hanging bullet. I will add an article related to this in online documentation as well for further future references as well.

Many Thanks,