Need help on Documentbuilder

I have a paragraph that is coming in 2 line in aspose document.
I want to control line spacing between them.I am using a documentbuilder object. See the sample attached document. In Yellow section, i want to control line spacing between paragraphs of same type.I am using the sample code see below.

strPartice.Append(" ");
strPartice.Append(content.ContentTitle);---- Paragraph is here.
strPartice.Append(" ");

Please provide me sample code how can i manage this.See the attached sample abd see res section as well…

Hi,

Thanks for your inquiry. The html content that is inserted by using
will have Heading 6 style in Word document. You can access those Paragraphs with Heading 6 style during inserting HTML and set the spacing below and after them by using the following code snippet:

strPartice.Append("");
strPartice.Append("Paragraph's content");
strPartice.Append("");
doc.NodeChangingCallback = new HandleNodeChanging_Spacer();
builder.InsertHtml(strPartice.ToString());
public class HandleNodeChanging_Spacer : INodeChangingCallback
{
    void INodeChangingCallback.NodeInserted(NodeChangingArgs args)
    {
        if (args.Node.NodeType == NodeType.Run)
        {
            Run run = (Run)args.Node;
            Paragraph parentPara = run.ParentParagraph;
            if (parentPara.ParagraphFormat.StyleName.Equals("Heading 6"))
            {
                parentPara.ParagraphFormat.SpaceBefore = 30;
                parentPara.ParagraphFormat.SpaceAfter = 30;
            }
        }
    }
    void INodeChangingCallback.NodeInserting(NodeChangingArgs args)
    { }
    void INodeChangingCallback.NodeRemoved(NodeChangingArgs args)
    { }
    void INodeChangingCallback.NodeRemoving(NodeChangingArgs args)
    { }
}

I hope, this helps.

Best Regards,

The issues you have found earlier (filed as WORDSNET-6997) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan