Bullet Point are missing In text file

Not able to generate the Text file with bullet points.

Current Code:

Document.ToString(Aspose.Words.SaveFormat.Text);

Text File Issue.PNG (44.6 KB)

For more details please check attachment
TestFileIssue.zip (36.7 KB)

@hemalp Please use the following code:

Document doc = new Document(@"C:\Temp\in.doc");

doc.UpdateListLabels();
string str = doc.ToString(SaveFormat.Text);

Or the following:

Document doc = new Document(@"C:\Temp\in.doc");

using (MemoryStream ms = new MemoryStream())
{
    doc.Save(ms, SaveFormat.Text);
    string str = Encoding.UTF8.GetString(ms.ToArray());

    //......
}

Is there any way to save this string with UTF 8 Encoding Instead of UTF-8 with Bom Encoding.

Sample Code:

Document doc = new Document(@"C:\Temp\in.doc");

using (MemoryStream ms = new MemoryStream())
{
    doc.Save(ms, SaveFormat.Text);
    File.WriteAllText("in.txt",Encoding.UTF8.GetString(ms.ToArray()) , Encoding.UTF8);
}

@hemalp I’m afraid, there is no option to exclude BOM (Byte Order Mark) upon saving document to TXT format. However, you can remove the BOM, by removing the first 3 bytes from the beginning the byte array.