com.aspose.slides.PptEditException: Can't assign string which contains paragraph break character

Hi,

We are using Aspose slides for java and I get the error below when I try to add a textFrame to a rectangle.

com.aspose.slides.PptEditException: Can't assign string which contains paragraph break character
2008-08-04 13:28:38,233 ERROR [STDERR] at com.aspose.slides.Portion.setText(SourceFile:418)
2008-08-04 13:28:38,233 ERROR [STDERR] at com.aspose.slides.Shape.addTextFrame(SourceFile:1975)

Below is my code:

Rectangle rect = slide.getShapes().addRectangle(500, currentY, 4900, 1000);

rect.addTextFrame(sb.toString());

Appreciate your feedback

Hemanth

Dear Hemanth,

Actually, this error is because of line break characters. You should split your string and add a separate paragraph for each split string.