Hello,
Actually, the shapes in your provided ppts namely dotBullet.ppt and numberBullet.ppt are textholders not textframes.
So this is the correct way to get the paragraph bullet type.
First, I check, if shape is possibly a textholder, then I access paragraphs collection from it otherwise, I access paragraphs from textframe.
-------------------------------------------------------------------
try
{
Presentation srcPres = new Presentation(new FileInputStream(
"C:/Test/numberBullet.ppt"));
// Source slide with a single shape which is a linked pictureframe
Slide srcSld = srcPres.getSlideByPosition(1);
// Access first textframe and prints the bullet type
Shape shp = srcSld.getShapes().get(1);
Paragraphs paras=null;
//check, if shape is possibly a textholder,
//then access paragraphs collection from it otherwise
//access paragraphs from textframe.
if(shp.getPlaceholder()!=null && shp.isTextHolder())
{
//First type cast the placeholder into textholder and
//then get access to paragraphs
TextHolder thld=(TextHolder)shp.getPlaceholder();
paras=thld.getParagraphs();
}//if
else
{
TextFrame tf=shp.getTextFrame();
paras=tf.getParagraphs();
}//else
Paragraph para=paras.get(0);
// print bullet type
System.out.println(para.getBulletType());
} catch (Exception ex) {
ex.printStackTrace();
}//catch
Many Thanks and Kind Regards,
Shakeel Faiz
Support Developer
Aspose Sialkot Team
Contact UsAspose - The .NET and Java Component Publisher
Keep in touch! We're on
Twitter and
Facebook