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

Free Support Forum - aspose.com

Cannot display bullet in new Paragraph (Trial version)

Hi all,

currently I’m evaluating Aspose.Slides for Java. What I want to do is to add new Paragraph objects to a TextFrame.

What I’m able to do is to change the bullet character or to (un)hide the bullet via the setHasBullet(…) method, as long as I’m calling the methods on a Paragraph object which already exists in the PPT file (obtained via shape.getTextFrame().getParagraphs().get(i)).

However when I create a new Paragraph object via the following code and add it to the TextFrame (getParagraphs.add(par)), the bullet is never shown:

Paragraph par = new Paragraph();
par.setText(“new Paragraph”);
par.setBulletColor(new Color(137, 137, 137));

The call of the methods setHasBullet(true) and setBulletColor(…) seem to have no effect at all, since when I call getBulletColor() and getHasBullet() later on, I get the return values Color(0, 0, 0) for bullet color and false for hasBullets.

Am I missing something, or could this be a restriction in the free trial versions? (I tried versions 2.7.0 and 2.6.0).

If the latter is the case, are there other restrictions, and what are they?

Thank you very much in advance.

Kind Regards

Hi Stefan,

I have worked over the issue shared by you. I like to share that before applying the bullet properties you need to add the generated paragraph in Text Frame. For your kind reference, I have shared the sample code and generated presentation. I have used Aspose.Slides for Java 2.7.0.

Presentation pres=new Presentation();
Slide slide=pres.getSlideByPosition(1);
//Adding new shape and removing all paragraphs inside its text frame
com.aspose.slides.Shape shape=slide.getShapes ().addRectangle(200,200,800,600);
TextFrame txtFrm=shape.addTextFrame (“Hi thre”);
txtFrm.getParagraphs ().removeAt (0);
Paragraph para1 = new Paragraph();
para1.setText(“new Paragraph”);
para1.setBulletColor(new java.awt.Color(137, 137, 137));
Paragraph para2 = new Paragraph();
para2.setText(“new Paragraph 2”);
para2.setBulletColor(new java.awt.Color(137, 137, 137));
pres.write(“D:\Aspose Data\bullet.ppt”);

Many Thanks,


adding the paragraph first does the trick. Now it works! Many Thanks!!

Kind Regards