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,
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.
Best regards,
MAM
Hi MAM,
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,
para.setIndent(-20.0f);
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,