Hello,
I have a situation where I want to save 2 copies of a document. If I have comments in a document, I will first save with those comments, then I want to save without the comments. The issue is that when I save the second time it includes the comments.
If I clear comments without saving first, I get the desired result without comments, but I do not get the document with comments as well.
Is there a way to reset this / clear cache before trying to save the same document a second time?
Here is a code snippet:
var doc = new Document("c:\\temp\\MyDocument.docx");
// I am using PdfSaveOptions for specific reason.
SaveOptions saveOptions = new PdfSaveOptions()
{
SaveFormat = SaveFormat.Pdf
};
docToSave.Save("c:\\temp\\myOutPut_rev.pdf", saveOptions);
doc.GetChildNodes(NodeType.Comment, true).Clear();
docToSave.Save("c:\\temp\\myOutPut.pdf", saveOptions);
Thanks,
Charles