Getting Error when adding text frame in slide (JAVA)

Hi ,
I am trying to use text frame and trying to assign one string to in it whcih is having some paragraph break character(-)
so its throwing below given error.
com.aspose.slides.PptEditException: Can’t assign string which contains paragraph break character

so pleas if any one having solution for this problem please let me know.
my peace of code where its throwing error :-

String description = “capablity - 2613”;
Rectangle rect = slide.getShapes().addRectangle(xPosition, yPosition, width, height);
rect.getLineFormat().setShowLines(false);
rect.addTextFrame(description);
TextFrame tf =rect.getTextFrame();
Paragraph paragraph= tf.getParagraphs().get(0);
Portion portion =paragraph.getPortions().get(0);
tf.setWrapText(true);
portion.setFontBold(true);
portion.setFontHeight((short)10);


here above when control comes on rect.addTextFrame(description); it throw an error like nto allowing paragraph break charactor.


Thanks & Regards
Setu Agrawal

Dear Setu,

Please see this thread.

<A href="https://forum.aspose.com/t/107633</A></P>