We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem moving text to two lines in Table of contents


I am using table of contents and my requirement is to move a part of the Heading to the next line in the table of contents. i have tried to use line break
"\n" but nothing seems to work.

I am adding a string to the heading as

Heading h1 = new Heading(pdf,sec,1);

Segment s1 = new Segment();

S1.content = "text1" + "
" + "Text2"; //My requiremnet is to show the text in two lines.


h1.isInList = true;


Please help. some


I will check with the developers to see if this is supported and reply to you soon.


You can use “#$NL”. Please refer to http://www.aspose.com/Products/Aspose.Pdf/Api/Symbols-List-and-Purpose.html


Thank you it worked, we are able to move the text to the next line. We have a different issue of text not moving to next line after certain characters. You can close this one, we a different post for that.