We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Word document convert to Pdf missing comments

Hi Syncfusion team,

Trying to convert the docx to pdf but the comments is missing. Please assist.

Attached sample docx and code below.


using (MemoryStream memWord = new MemoryStream(fileBytes))


                        var wordDocument = new WordDocument(memWord, Syncfusion.DocIO.FormatType.Automatic);

                        // Creates a new instance of DocIORenderer class.

                        DocIORenderer render = new DocIORenderer();

                        // Converts Word document into PDF document.

                        PdfDocument pdf = render.ConvertToPDF(wordDocument);

                        // Save the PDF document.


                        using (FileStream file = new FileStream(Path.Combine(Path.GetTempPath(), "test.pdf"), FileMode.Create, FileAccess.Write))






Attachment: Lorem_9f7794b7.zip

1 Reply

AA Akash Arul Syncfusion Team March 8, 2023 09:49 AM UTC

Hi Jinchuan,

On further analyzing the given details, we found that your requirement is to preserve the comment in the converted PDF. To preserve the comment in converted PDF, please set the CommentDisplayMode API as ShowInBalloons and then convert the Word document to PDF. So that the comments will be preserved.

Code Snippet:

WordDocument wordDocument = new WordDocument(fileStream,FormatType.Docx)

//Sets ShowInBalloons to render a document comments in converted PDF document.

wordDocument.RevisionOptions.CommentDisplayMode = CommentDisplayMode.ShowInBalloons;

Please refer to the below UG documentation to know how to preserve comments in a generated PDF

If this post is helpful, please consider accepting it as the solution so that other members can locate it more quickly.


Live Chat Icon For mobile
Up arrow icon