When append document from one document to another then getting some formatting issues

Hiii team,
I am merging multiple documents in single document using append document function then destination document in getting some formatting issues like paragraph movement ,Alignment and bullet number issues.

Snippet:

Aspose.Words.Document destinationDoc = new Aspose.Words.Document();
destinationDoc.RemoveAllChildren();
//here sourceBytes are list of source document bytes
for (var i = 0; i < sourceBytes.Count, i++)
{
    Aspose.Words.Document source = new Aspose.Words.Document(new MemoryStream(sourceBytes[i]));

    destinationDoc.AppendDocument(source, Aspose.Words.ImportFormatMode.KeepSourceFormatting);
}

Screen shorts:
SourceImage.JPG (155.3 KB)
DestinationImage.JPG (170.6 KB)

@AlpeshChaudhari12345 can you please attach your documents.

attachments : SourceDoc (2).docx (2.4 MB)

1 Like

@AlpeshChaudhari12345 sorry I cannot replicate your problem. I use the following code with the latest version of Aspose.Words (v23.4.0):

Document document1 = new Document();
Document document2 = new Document("C:\\Temp\\input.docx");

document1.RemoveAllChildren();
document1.AppendDocument(document2, ImportFormatMode.KeepSourceFormatting);

document1.Save("C:\\Temp\\output.docx", SaveFormat.Docx);

output.docx (23.0 KB)