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

Free Support Forum - aspose.com

When converting docx to pdf how can we exclude comments / turn off "Print Markup"

When converting docx to pdf how can we exclude comments / turn off “Print Markup”?

@ballpwh You can use CommentDisplayMode.Hide to hide comments in the output PDF document.

Document doc = new Document(@"C:\Temp\in.docx");
doc.LayoutOptions.CommentDisplayMode = Aspose.Words.Layout.CommentDisplayMode.Hide;
doc.Save(@"C:\Temp\out.pdf");
1 Like

Thank you Alexey! Is there also a simple way to hide the change tracking for the document with LayoutOptions.RevisionOptions?

@ballpwh You can accept or reject revisions before converting your document to PDF.
Also, you can use RevisionOptions.ShowRevisionMarks and RevisionOptions.ShowRevisionBars to hide revisions:

Document doc = new Document(@"C:\Temp\in.docx");
doc.LayoutOptions.RevisionOptions.ShowRevisionMarks = false;
doc.LayoutOptions.RevisionOptions.ShowRevisionBars = false;
doc.Save(@"C:\Temp\out.pdf");
1 Like