Hi there,
Thanks for your inquiry. Your both documents are same. You can accept all revision and remove the paragraph and run node formatting using following code example. Hope this helps you.
If you still face problem, please share your expected output document here for our reference. We will then provide you more information about your query along with code.
Document doc = new Document(MyDir + "Sample.docx");
Console.WriteLine(doc.ProtectionType.ToString()); //AllowOnlyRevisions
doc.Unprotect("1");
doc.AcceptAllRevisions();
doc.StopTrackRevisions();
doc.TrackRevisions = false;
// If you want to clear font formatting of document,
// please use following code snippet
foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
{
para.ParagraphFormat.ClearFormatting();
foreach (Run run in para.Runs)
{
run.Font.ClearFormatting();
}
}
// Remove the background color of table's cells
foreach (Cell cell in doc.GetChildNodes(NodeType.Cell, true))
{
cell.CellFormat.Shading.ClearFormatting();
}
doc.Save(MyDir + "Out 17.2.0.docx");