Hi Stefan,
Thanks for you inquiry.
I have used the following code snippet and able to resolve the issue which you were facing.
Note: I am using latest version of Aspose.Slides for Java which can be found
here.
public static void para(){
try{
//Instantiate a PresentationEx class that represents a PPTX file
PresentationEx pres = new PresentationEx();
//Accessing first slide
SlideEx slide = pres.getSlides().get(0);
//Add an AutoShape of Rectangle type
int idx = slide.getShapes().addAutoShape(ShapeTypeEx.RECTANGLE, 50, 150, 300, 150);
AutoShapeEx ashp = (AutoShapeEx)slide.getShapes().get(idx);
//Access TextFrame of the AutoShape
String text = "abc\ndef\nghi\njkl";
TextFrameEx tf = ashp.getTextFrame();
tf.setText(text);
//Write PPTX to Disk
pres.write("D:\\Assignments\\Aspose.Slides\\Java\\Queries\\ParaTest.pptx");
}catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Many Thanks.
Best Regards
Hassan Farrukh
Support Developer
Aspose Sialkot Team
Aspose - The .NET and Java Component Publisher