Re: Oups + How To

  •  02-08-2006, 11:11 AM

    Re: Oups + How To

    Please check this thread, it contains attached code at the end
    http://www.aspose.com/Community/Forums/40800/ShowPost.aspx

    We don't provide automatic inserting string with carriage returns for better flexibility.
    You can find my explanations why we disabled it in 2.3.6 in this forum.
    Simple string parsing will take not more than 10 lines of code.

    string sometext = "#\n#";
    Paragraphs paras = pres.Slides[0].Shapes[0].TextFrame.Paragraphs;

    char[] delimiters = new char[] {'\r', '\n'};
    string[] split = sometext.Split(delimiters);
    paras[0].Portions[0].Text = split[0];
    for (int i = 1; i < split.Length; i++) {
        paras.Insert(i, new Paragraph(paras[i - 1]));
        paras[ i ].Portions.Clear();
        paras[ i ].Portions.Add(new Portion(paras[0].Portions[0]));
        paras[ i ].Portions[0].Text = split[ i ];
    }

    Hard work. Isn't it?

    Alexey Zhilin
    Team Leader
    Aspose Tyumen Team
    About Us
    Contact Us
View Complete Thread