Hi,
Shapes shapes = slide.getShapes();
for (int j = 0; j < shapes.size(); j++) {
if (shapes.get(j).getAlternativeText().equals("target"))
{
//Copy the source shape into a stream
FileOutputStream fs = new FileOutputStream(new File("c:\\target.as"));
Shape shp = shapes.get(j);
shp.serialize(fs);
//Add the shape from stream
FileInputStream fis = new FileInputStream(new File("c:\\target.as"));
Shape dstShape=slide.getShapes().add(fis);
dstShape.setX(x2+5);
dstShape.setX(ycol);
}
}
when i run the above code i get
7/06/15 14:00:55 com.aspose.slides.PptException: Shape is abstract class and can't be serialized.
07/06/15 14:00:55 at com.aspose.slides.Shape.serialize(SourceFile:284)
07/06/15 14:00:55 at com.oracle.utils.BATool.addLine(BATool.java:1368)
the above stack trace telling shape is abstract and cannot be serialized.
please suggest on how to proceed?
Thanks,
prashanth