GroupDocsGists
10/19/2017 - 11:13 AM

RenderWordDocumentAsPDFWithTrackedChanges.cs

// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET
// Create/initialize image handler 
ViewerImageHandler imageHandler = new ViewerImageHandler(Utilities.GetConfigurations());

// Set pdf options to get original file without annotations
PdfFileOptions options = new PdfFileOptions();
options.WordsOptions.ShowTrackedChanges = true; // Default value is false

// Call GetPdfFile to get FileContainer type object which contains the stream of pdf file.
FileContainer container = imageHandler.GetPdfFile(DocumentName, options);

//Change the extension of the file and assign to a string type variable filename
String filename = Path.GetFileNameWithoutExtension(DocumentName) + ".pdf";

//Save each image at disk
Utilities.SaveFile(filename, container.Stream);