Converting Word Document to PDF that has comments

Hi,

Is there a way to exclude “Comments” when converting a Word Document to PDF ?

I have attached a docx that has a comment, when I convert it to PDF using Aspose, it generates the PDF with the comments.

How to prevent that ?

Please let me know

Thanks

Imran

Hi Imran,

Thanks for your inquiry. Please refer to the following article:
Working with Comments

Please use following code example to exclude comments in output document. Hope this helps you.

Document doc = new Document(MyDir + "Aspose_Comments_Doc.docx");
// Remove comments from document
doc.GetChildNodes(NodeType.Comment, true).Clear();
doc.Save(MyDir + "17.4.pdf", SaveFormat.Pdf);

Thank you !

I will give it a try.