deepi
November 23, 2011, 5:55am
1
how to insert new line between content in word document ?
if (sbContent.Length> 0)
{
oDocBuilder = new DocumentBuilder(oCurrentDoc);
oDocBuilder.InsertHtml("" + sbnContent.ToString() + " ");
}
if (oCurrentDoc.ChildNodes.Count> 0)
{
oCurrentDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous;
foreach(Section srcSection in oCurrentDoc)
{
Section newSection = (Section) oDestDoc.ImportNode(srcSection, true, ImportFormatMode.KeepSourceFormatting);
oDestDoc.Sections.Add(newSection);
}
}
Hi,
Thanks for your inquiry. Aspose.Words supports different Control Characters that can be inserted in between content; please visit the following link for more details:
https://reference.aspose.com/words/net/aspose.words/controlchar/
I hope, this will help.
Best Regards,
deepi
November 23, 2011, 6:31am
3
iam asking how to insert \n new characteer between footnote contents?
i tried by given way oDocBuilder.Write
iam getting problem when sbHfnContent.Length = 0
case
at tht case iam getting content from direct document itself…how to keep \n there?
if (sbHfnContent.Length> 0)
{
oDocBuilder = new DocumentBuilder(oCurrentDoc);
oDocBuilder.InsertHtml("" + sbHfnContent.ToString() + " "); **
oDocBuilder.Write("\n\n"); **
}
if (oCurrentDoc.ChildNodes.Count> 0)
{
oCurrentDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous;
foreach(Section srcSection in oCurrentDoc)
{
Section newSection = (Section) oDestDoc.ImportNode(srcSection, true, ImportFormatMode.KeepSourceFormatting);
oDestDoc.Sections.Add(newSection);
}
}
AndreyN
November 23, 2011, 8:59am
4
Hello
Thank you for additional information. In case of using “\r” and “\n” you should use DocumentBuilder.Write method. “\r” and “\n” it is not HTML special characters. For example in HTML you can use the following tag to break line instead of “\r\n”.
Best regards,