Free Support Forum - aspose.com

Table borders after change text are no

Hi,


Attached file have a table and when I iterate throught it and change the text, after this table borders are no. I attach the file(table.ppt) and changed file(no-borders-table.ppt). Can you explain me what happened please?
Following code is used for this:

public void tabela() throws Exception {
String path = “path/table.ppt”;
Presentation presentation = new Presentation(path);
iterateShapes(presentation.getSlides().get(0).getShapes());
presentation.save(“path/no-border-table.ppt”,
SaveFormat.PPT);
}
private void iterateShapes(Shapes shapes) {
for (int i = 0; i < shapes.size(); i++) {
Shape shape = shapes.get(i);
if (shape instanceof GroupShape) {
GroupShape groupShape = (GroupShape) shape;
iterateShapes(groupShape.getShapes());
continue;
}
if (shape instanceof TextFrame) {
TextFrame textFrame = (TextFrame) shape;
Paragraphs paragraphs = textFrame.getParagraphs();
iterateParagraphs(paragraphs);
continue;
}
if (shape.getTextFrame() != null) {
TextFrame textFrame = shape.getTextFrame();
Paragraphs paragraphs = textFrame.getParagraphs();
iterateParagraphs(paragraphs);
}
}
}
private void iterateParagraphs(Paragraphs paragraphs) {
for (int i = 0; i < paragraphs.getCount(); i++) {
Paragraph paragraph = paragraphs.get(i);
paragraph.setText(“a”);
}
}


Thanks,
Bojan

Hi Bojan,


Thanks for inquiring Aspose.Slides.

I have observed the sample code and it seems to be a partial portion of code. Can you please provide the source, generated and desired output presentations. Please also share the working sample code that I may use on my end to help you out. Please also share that which version of Aspose.Slides for Java you are using. From, code it seems you are using older version of Aspose.Slides for Java. Please try using Aspose.Slides for Java 7.2.0 first on your end before sharing the information requested.

Many Thanks,