List item indent issue

Hi,
I am having an issue with my list item indents (Please see attached). What i want is to remove the space between the list number and the start of the text on the first line. The code i am currently using is

foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
{
    if (para.IsListItem)
    {
        ListFormat listFormat = para.ListFormat;
        int listId = listFormat.List.ListId;
        para.ParagraphFormat.FirstLineIndent = 10;
        para.ParagraphFormat.FirstLineIndent = -10;
        para.ParagraphFormat.LeftIndent = 10;
        double tabStop = 10;
        para.ParagraphFormat.TabStops.Add(new TabStop(tabStop, Aspose.Words.TabAlignment.Left, TabLeader.None));
        if (listFormat.ListLevelNumber > 0)
        {
            if (!multiListIds.Contains(listId))
            {
                multiListIds.Add(listId);
                if (singleListIds.Contains(listId))
                    singleListIds.Remove(listId);
            }
        }
        else
        {
            if (!singleListIds.Contains(listId) && !multiListIds.Contains(listId))
            {
                singleListIds.Add(listId);
            }
        }
    }
}

Hi Steve,

Thanks for your inquiry. Apart from tab character, the extra space is caused by ‘No-Break Space’ characters at the start of paragraphs. You can remove these characters from start of paragraph as follows:

Document doc = new Document(MyDir + @"Register+of+Mortgages+and+Charges+(5).docx");
foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
{
    if (para.IsListItem)
    {
        if (para.ToString(SaveFormat.Text).StartsWith(((char)0x00A0).ToString()))
        {
            foreach (Run run in para.Runs)
            {
                run.Text = run.Text.Trim();
            }
        }
    }
}
doc.Save(MyDir + @"15.10.0.docx");

Could you please also attach your expected document here for our reference. We will investigate the structure of your expected document as to how you want your final output be generated like. You can create expected document using Microsoft Word. We will then provide you code to achieve the same using Aspose.Words.

Best regards,