We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Converting Word Document to PDF that has comments


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



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.