Skip to content

Commit 0268d2a

Browse files
Updated render word processing
1 parent f0d85c1 commit 0268d2a

File tree

2 files changed

+69
-27
lines changed
  • content/english/net/rendering-word-processing-documents

2 files changed

+69
-27
lines changed

content/english/net/rendering-word-processing-documents/_index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ url: /net/rendering-word-processing-documents/
99
---
1010

1111
## Rendering Word Processing Documents Tutorials
12-
### [Render Tracked Changes](./render-tracked-changes/)
12+
### [Render Tracked Changes](./render-tracked-changes/)
13+
Discover how to render tracked changes in documents effortlessly using GroupDocs.Viewer for .NET. Enhance your document management efficiency.

content/english/net/rendering-word-processing-documents/render-tracked-changes/_index.md

Lines changed: 67 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,83 @@
22
title: Render Tracked Changes
33
linktitle: Render Tracked Changes
44
second_title: GroupDocs.Viewer .NET API
5-
description:
5+
description: Discover how to render tracked changes in documents effortlessly using GroupDocs.Viewer for .NET. Enhance your document management efficiency.
66
type: docs
77
weight: 10
88
url: /net/rendering-word-processing-documents/render-tracked-changes/
99
---
10+
## Introduction
11+
In today's digital era, managing and viewing documents efficiently is crucial for businesses and individuals alike. With the advent of advanced technologies, solutions like GroupDocs.Viewer for .NET have revolutionized how we interact with various document formats, including Word documents, PDFs, and more. In this comprehensive guide, we'll delve into how to leverage GroupDocs.Viewer for .NET to render tracked changes in your documents seamlessly.
12+
## Prerequisites
13+
Before diving into the tutorial, ensure you have the following prerequisites:
14+
1. GroupDocs.Viewer for .NET Installation: Download and install GroupDocs.Viewer for .NET from the [website](https://releases.groupdocs.com/viewer/net/).
15+
2. .NET Framework: Ensure you have the .NET Framework installed on your system.
16+
3. Document Directory: Prepare a directory where your documents will be stored.
1017

11-
## Complete Source Code
18+
## Import Namespaces
19+
To begin, import the necessary namespaces into your project. These namespaces are essential for utilizing GroupDocs.Viewer functionalities effectively.
20+
## Steps:
21+
1. Open Your IDE: Launch your preferred Integrated Development Environment (IDE), such as Visual Studio.
22+
2. Create or Open Your Project: Start a new project or open an existing one where you intend to use GroupDocs.Viewer.
23+
3. Import Namespaces: Within your project file or code file, add the following namespaces:
1224
```csharp
1325
using System;
1426
using System.IO;
1527
using GroupDocs.Viewer.Options;
28+
```
1629

17-
namespace GroupDocs.Viewer.Examples.CSharp.AdvancedUsage.Rendering.RenderingOptionsByDocumentType.RenderingWordProcessingDocuments
30+
Now, let's break down the provided example into multiple steps to guide you through rendering tracked changes using GroupDocs.Viewer for .NET.
31+
## Step 1: Set Output Directory
32+
Firstly, define the directory where you want the rendered output to be saved.
33+
```csharp
34+
string outputDirectory = "Your Document Directory";
35+
```
36+
Replace `"Your Document Directory"` with the path to your desired directory.
37+
## Step 2: Define Page File Path Format
38+
Specify the format for the page file paths. This format will determine how the rendered pages are named and stored.
39+
```csharp
40+
string pageFilePathFormat = Path.Combine(outputDirectory, "page_{0}.html");
41+
```
42+
Here, `"page_{0}.html"` indicates that the pages will be named as `page_1.html`, `page_2.html`, and so on.
43+
## Step 3: Initialize Viewer Object
44+
Initialize a `Viewer` object by passing the document's path as an argument.
45+
```csharp
46+
using (Viewer viewer = new Viewer(TestFiles.SAMPLE_DOCX_WITH_TRACKED_CHANGES))
1847
{
19-
/// <summary>
20-
/// This example demonstrates how to render tracked changes.
21-
/// </summary>
22-
class RenderTrackedChanges
23-
{
24-
public static void Run()
25-
{
26-
string outputDirectory = "Your Document Directory";
27-
string pageFilePathFormat = Path.Combine(outputDirectory, "page_{0}.html");
28-
29-
using (Viewer viewer = new Viewer(TestFiles.SAMPLE_DOCX_WITH_TRACKED_CHANGES))
30-
{
31-
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources(pageFilePathFormat);
32-
options.WordProcessingOptions.RenderTrackedChanges = true;
33-
34-
viewer.View(options);
35-
}
36-
37-
Console.WriteLine($"\nSource document rendered successfully.\nCheck output in {outputDirectory}.");
38-
}
39-
}
48+
// Code continues in next step...
4049
}
41-
42-
4350
```
51+
Ensure to replace `TestFiles.SAMPLE_DOCX_WITH_TRACKED_CHANGES` with the path to your document.
52+
## Step 4: Configure HTML View Options
53+
Configure HTML view options to customize the rendering settings, such as rendering tracked changes.
54+
```csharp
55+
HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources(pageFilePathFormat);
56+
options.WordProcessingOptions.RenderTrackedChanges = true;
57+
```
58+
This step enables rendering tracked changes in the output HTML.
59+
## Step 5: Render Document
60+
Render the document using the configured options.
61+
```csharp
62+
viewer.View(options);
63+
```
64+
This command initiates the rendering process based on the provided settings.
65+
## Step 6: Display Output Directory
66+
Inform the user about the location where the rendered output is stored.
67+
```csharp
68+
Console.WriteLine($"\nSource document rendered successfully.\nCheck output in {outputDirectory}.");
69+
```
70+
This message notifies the user about the successful rendering and where to find the output files.
71+
72+
## Conclusion
73+
In conclusion, GroupDocs.Viewer for .NET offers a powerful solution for rendering tracked changes in documents effortlessly. By following the step-by-step guide outlined in this article, you can seamlessly integrate this functionality into your .NET applications, enhancing document management efficiency.
74+
## FAQ's
75+
### Can I render tracked changes in various document formats using GroupDocs.Viewer for .NET?
76+
Yes, GroupDocs.Viewer supports rendering tracked changes in multiple formats, including DOCX, PDF, and more.
77+
### Is GroupDocs.Viewer for .NET compatible with all .NET Framework versions?
78+
Yes, GroupDocs.Viewer for .NET is compatible with various versions of the .NET Framework, ensuring broad compatibility.
79+
### Does GroupDocs.Viewer offer any free trial for testing purposes?
80+
Yes, you can avail of a free trial of GroupDocs.Viewer to explore its features before making a purchase decision.
81+
### Can I customize the rendering settings to meet specific requirements?
82+
Absolutely, GroupDocs.Viewer provides extensive customization options, allowing you to tailor the rendering process according to your needs.
83+
### Where can I seek assistance if I encounter any issues or have questions about GroupDocs.Viewer?
84+
For support and community assistance, you can visit the GroupDocs.Viewer forum at [this link](https://forum.groupdocs.com/c/viewer/9).

0 commit comments

Comments
 (0)