Free Support Forum - aspose.com

Problem moving text to two lines in Table of contents

HI,

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.segments.add(s1);

h1.isInList = true;

sec1.paragraphs.add(h1);

Please help. some

Hi,

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

Thanks.

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

HI,

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.

Regards,

DSR