---
title: "Converting a Word document to PDF while preserving comments"
canonical_url: "https://www.nutrient.io/guides/dotnet/csharp/conversion/word-document-to-pdf-including-comments/"
md_url: "https://www.nutrient.io/guides/dotnet/csharp/conversion/word-document-to-pdf-including-comments.md"
last_updated: "2026-10-08T00:00:00.000Z"
description: "Learn how to convert Word documents to PDF while preserving all comments and annotations using Nutrient .NET SDK with just a few lines of code."
---

# Converting a Word document to PDF while preserving comments

Converting Word documents to PDF with comments preserved — whether for contracts, technical specifications, or regulatory documents — ensures that all stakeholder input remains accessible in the final format.

## How Nutrient helps you achieve this

Nutrient.NET SDK handles DOCX-to-PDF conversion with comment preservation. With the SDK, you don’t need to worry about:

- Parsing Word document structures

- Managing comment extraction and placement

- Handling markup mode configuration

- Complex annotation conversion logic

Instead, Nutrient provides an API that handles all the complexity behind the scenes, letting you focus on your business logic.

## Complete implementation

Below is a complete working example that demonstrates DOCX-to-PDF conversion with comments preserved. This line sets up the C# application. The using directive brings in the Nutrient SDK namespace:

```csharp

using Nutrient;

```

This line opens the Word document containing comments. The [using declaration](https://learn.microsoft.com/dotnet/csharp/language-reference/statements/using) ensures the document is automatically closed when it goes out of scope, preventing resource leaks:

```csharp

try
{
    using Document document = Document.Open("input_with_comments.docx");

```

This line configures the markup mode through the document’s Word settings. Four modes are available:

- `AllMarkup` — Show all markups in different colors, underlined/struck through. Comments are converted to annotations. This is the default behavior.

- `SimpleMarkup` — Show the document as if all changes were accepted. Comments are converted to annotations.

- `NoMarkup` — Show the document as if all changes were accepted. Comments aren't converted to annotations.

- `Original` — Show the document as if none of the changes were made (as if all changes were rejected). Comments aren't converted to annotations:

```csharp

    document.Settings.WordSettings.MarkupMode = DocumentMarkupMode.AllMarkup;

```

This block exports the document to PDF with all comments preserved as annotations. The try-catch block handles potential errors using `NutrientException`:

```csharp

    document.ExportAsPdf("output.pdf");
    Console.WriteLine("Successfully converted with comments preserved");
}
catch (NutrientException e)
{
    Console.Error.WriteLine($"Error: {e.Message}");
    Environment.Exit(1);
}

```

## Conclusion

The conversion logic consists of three steps:

1. Open the document.

2. Configure the markup mode.

3. Export as PDF.

Nutrient handles Word document parsing and comment conversion so you don't need to understand document internals or manage annotation placement manually.
---

## Related pages

- [Nutrient .NET SDK conversion guides](/guides/dotnet/csharp/conversion.md)
- [Converting CAD files to PDF](/guides/dotnet/csharp/conversion/cad-to-pdf.md)
- [Converting email files to PDF](/guides/dotnet/csharp/conversion/email-to-pdf.md)
- [Converting a document from XLSX to PDF format](/guides/dotnet/csharp/conversion/excel-document-to-pdf.md)
- [Converting HTML to PDF](/guides/dotnet/csharp/conversion/html-to-pdf.md)
- [Converting a document from Markdown to PDF format](/guides/dotnet/csharp/conversion/markdown-to-pdf.md)
- [Converting PDF pages to images](/guides/dotnet/csharp/conversion/pdf-pages-to-images.md)
- [Converting PDF documents to Excel format for data analysis](/guides/dotnet/csharp/conversion/pdf-to-excel-document.md)
- [Converting PDF documents to HTML format for web publishing](/guides/dotnet/csharp/conversion/pdf-to-html.md)
- [Converting PDF documents to image format](/guides/dotnet/csharp/conversion/pdf-to-image.md)
- [Converting PDF documents to Markdown format](/guides/dotnet/csharp/conversion/pdf-to-markdown.md)
- [Converting PDF documents to PDF/A format](/guides/dotnet/csharp/conversion/pdf-to-pdf-a.md)
- [Converting PDF documents to PDF/UA format](/guides/dotnet/csharp/conversion/pdf-to-pdf-ua.md)
- [Converting PDF documents to PowerPoint presentations](/guides/dotnet/csharp/conversion/pdf-to-powerpoint-document.md)
- [Converting a document from PDF to DOCX format](/guides/dotnet/csharp/conversion/pdf-to-word-document.md)
- [Converting a document from PPTX to PDF format](/guides/dotnet/csharp/conversion/powerpoint-document-to-pdf.md)
- [Preparing and troubleshooting PDF/A conversion](/guides/dotnet/csharp/conversion/prepare-and-troubleshoot-pdf-a-conversion.md)
- [Converting a document from DOCX to PDF/UA format](/guides/dotnet/csharp/conversion/word-document-to-pdf-ua.md)
- [Converting a document from DOCX to PDF format](/guides/dotnet/csharp/conversion/word-document-to-pdf.md)

