RevisionOptions Class
Specifies the track changes revision options for Word to PDF conversion
Inheritance
Inherited Members
Namespace: Syncfusion.DocIO.DLS
Assembly: Syncfusion.DocIO.Base.dll
Syntax
public class RevisionOptions
Constructors
RevisionOptions()
Declaration
public RevisionOptions()
Properties
CommentColor
Gets or sets the color to be used for Comment. Default value is RevisionColor.Red.
Declaration
public RevisionColor CommentColor { get; set; }
Property Value
Type |
---|
RevisionColor |
Remarks
For now, Red color will be used if this property values specified as ByAuthor or Auto.
Examples
The following code example demonstrates how to set the CommentColor to preserve Comments color in Word to PDF Conversion.
//Loads an existing Word document
WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
//Sets ShowInBalloons to render a document comments in converted PDF document.
wordDocument.RevisionOptions.CommentDisplayMode = CommentDisplayMode.ShowInBalloons;
//Sets the color to be used for Comment Balloon.
wordDocument.RevisionOptions.CommentColor = RevisionColor.Pink;
//Instantiation of DocToPDFConverter for Word to PDF conversion
DocToPDFConverter converter = new DocToPDFConverter();
//Converts Word document into PDF document
PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
//Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf");
//Releases all resources used by the object
converter.Dispose();
//Closes the instance of document objects
wordDocument.Close();
pdfDocument.Close(true);
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument("Template.docx", FormatType.Docx)
'Sets ShowInBalloons to render a document comments in converted PDF document.
wordDocument.RevisionOptions.CommentDisplayMode = CommentDisplayMode.ShowInBalloons
'Sets the color to be used for Comment Balloon.
wordDocument.RevisionOptions.CommentColor = RevisionColor.Pink
'Instantiation of DocToPDFConverter for Word to PDF conversion
Dim converter As DocToPDFConverter = New DocToPDFConverter
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
'Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf")
'Releases all resources used by the object
converter.Dispose()
'Closes the instance of document objects
wordDocument.Close()
pdfDocument.Close(True)
CommentDisplayMode
Gets or sets a value that indicates whether to preserve Word document Comments in converted PDF document or not.Default value isCommentDisplayMode.Hide.
Declaration
public CommentDisplayMode CommentDisplayMode { get; set; }
Property Value
Type |
---|
CommentDisplayMode |
Examples
The following code example demonstrates how to set the CommentDisplayMode to preserve Comments in Word to PDF Conversion.
//Loads an existing Word document
WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
//Sets ShowInBalloons to render a document comments in converted PDF document.
wordDocument.RevisionOptions.CommentDisplayMode = CommentDisplayMode.ShowInBalloons;
//Instantiation of DocToPDFConverter for Word to PDF conversion
DocToPDFConverter converter = new DocToPDFConverter();
//Converts Word document into PDF document
PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
//Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf");
//Releases all resources used by the object
converter.Dispose();
//Closes the instance of document objects
wordDocument.Close();
pdfDocument.Close(true);
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument("Template.docx", FormatType.Docx)
'Sets ShowInBalloons to render a document comments in converted PDF document.
wordDocument.RevisionOptions.CommentDisplayMode = CommentDisplayMode.ShowInBalloons
'Instantiation of DocToPDFConverter for Word to PDF conversion
Dim converter As DocToPDFConverter = New DocToPDFConverter
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
'Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf")
'Releases all resources used by the object
converter.Dispose()
'Closes the instance of document objects
wordDocument.Close()
pdfDocument.Close(True)
DeletedTextColor
Gets or sets the color to be used for deleted content Deletions. Default value is RevisionColor.ByAuthor.
Declaration
public RevisionColor DeletedTextColor { get; set; }
Property Value
Type |
---|
RevisionColor |
Remarks
For now, Red color will be used if this property values specified as ByAuthor or Auto.
Examples
The following code example demonstrates how to set the DeletedTextColor to preserve Deleted content color in Word to PDF Conversion.
//Loads an existing Word document
WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
//Sets revision types to preserve track changes in PDF conversion.
wordDocument.RevisionOptions.ShowMarkup = RevisionType.Insertions | RevisionType.Formatting | RevisionType.Deletions;
//Sets the color for Deleted content color.
wordDocument.RevisionOptions.DeletedTextColor = RevisionColor.ClassicBlue;
//Instantiation of DocToPDFConverter for Word to PDF conversion
DocToPDFConverter converter = new DocToPDFConverter();
//Converts Word document into PDF document
PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
//Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf");
//Releases all resources used by the object
converter.Dispose();
//Closes the instance of document objects
wordDocument.Close();
pdfDocument.Close(true);
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument("Template.docx", FormatType.Docx)
'Sets revision types to preserve track changes in PDF conversion.
wordDocument.RevisionOptions.ShowMarkup = RevisionType.Insertions Or RevisionType.Formatting Or RevisionType.Deletions
'Sets the color for Deleted content color.
wordDocument.RevisionOptions.DeletedTextColor = RevisionColor.ClassicBlue
'Instantiation of DocToPDFConverter for Word to PDF conversion
Dim converter As DocToPDFConverter = New DocToPDFConverter
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
'Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf")
'Releases all resources used by the object
converter.Dispose()
'Closes the instance of document objects
wordDocument.Close()
pdfDocument.Close(True)
InsertedTextColor
Gets or sets the color to be used for inserted content Insertions. Default value is RevisionColor.ByAuthor.
Declaration
public RevisionColor InsertedTextColor { get; set; }
Property Value
Type |
---|
RevisionColor |
Remarks
For now, Blue color will be used if this property values specified as ByAuthor or Auto.
Examples
The following code example demonstrates how to set the InsertedTextColor to preserve inserted text color in Word to PDF Conversion.
//Loads an existing Word document
WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
//Sets revision types to preserve track changes in PDF conversion.
wordDocument.RevisionOptions.ShowMarkup = RevisionType.Insertions | RevisionType.Formatting | RevisionType.Deletions;
//Sets the color for inserted text color.
wordDocument.RevisionOptions.InsertedTextColor = RevisionColor.ClassicRed;
//Instantiation of DocToPDFConverter for Word to PDF conversion
DocToPDFConverter converter = new DocToPDFConverter();
//Converts Word document into PDF document
PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
//Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf");
//Releases all resources used by the object
converter.Dispose();
//Closes the instance of document objects
wordDocument.Close();
pdfDocument.Close(true);
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument("Template.docx", FormatType.Docx)
'Sets revision types to preserve track changes in PDF conversion.
wordDocument.RevisionOptions.ShowMarkup = RevisionType.Insertions Or RevisionType.Formatting Or RevisionType.Deletions
'Sets the color for inserted text color.
wordDocument.RevisionOptions.InsertedTextColor = RevisionColor.ClassicRed
'Instantiation of DocToPDFConverter for Word to PDF conversion
Dim converter As DocToPDFConverter = New DocToPDFConverter
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
'Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf")
'Releases all resources used by the object
converter.Dispose()
'Closes the instance of document objects
wordDocument.Close()
pdfDocument.Close(True)
RevisedPropertiesColor
Gets or sets the color to be used for content with changes of formatting properties Formatting. Default value is RevisionColor.ByAuthor.
Declaration
public RevisionColor RevisedPropertiesColor { get; set; }
Property Value
Type |
---|
RevisionColor |
Remarks
For now, Red color will be used if this property values specified as ByAuthor or Auto.
Examples
The following code example demonstrates how to set the RevisedPropertiesColor to preserve track changes color in Word to PDF Conversion.
//Loads an existing Word document
WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
//Sets revision types to preserve track changes in PDF conversion.
wordDocument.RevisionOptions.ShowMarkup = RevisionType.Insertions | RevisionType.Formatting | RevisionType.Deletions;
//Sets the color for Revised property color.
wordDocument.RevisionOptions.RevisedPropertiesColor = RevisionColor.Turquoise;
//Instantiation of DocToPDFConverter for Word to PDF conversion
DocToPDFConverter converter = new DocToPDFConverter();
//Converts Word document into PDF document
PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
//Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf");
//Releases all resources used by the object
converter.Dispose();
//Closes the instance of document objects
wordDocument.Close();
pdfDocument.Close(true);
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument("Template.docx", FormatType.Docx)
'Sets revision types to preserve track changes in PDF conversion.
wordDocument.RevisionOptions.ShowMarkup = RevisionType.Insertions Or RevisionType.Formatting Or RevisionType.Deletions
'Sets the color for Revised property color.
wordDocument.RevisionOptions.RevisedPropertiesColor = RevisionColor.Turquoise
'Instantiation of DocToPDFConverter for Word to PDF conversion
Dim converter As DocToPDFConverter = New DocToPDFConverter
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
'Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf")
'Releases all resources used by the object
converter.Dispose()
'Closes the instance of document objects
wordDocument.Close()
pdfDocument.Close(True)
RevisionBarsColor
Gets or sets the color to be used for revision bars that identify document lines containing revised information. Default value is RevisionColor.Red.
Declaration
public RevisionColor RevisionBarsColor { get; set; }
Property Value
Type |
---|
RevisionColor |
Remarks
For now, Red color will be used if this property values specified as ByAuthor or Auto.
Examples
The following code example demonstrates how to set the RevisionBarsColor to preserve Revision mark color in Word to PDF Conversion.
//Loads an existing Word document
WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
//Sets revision types to preserve track changes in PDF conversion.
wordDocument.RevisionOptions.ShowMarkup = RevisionType.Insertions | RevisionType.Formatting | RevisionType.Deletions;
//Sets the color for Revision mark color.
wordDocument.RevisionOptions.RevisionBarsColor = RevisionColor.Pink;
//Instantiation of DocToPDFConverter for Word to PDF conversion
DocToPDFConverter converter = new DocToPDFConverter();
//Converts Word document into PDF document
PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
//Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf");
//Releases all resources used by the object
converter.Dispose();
//Closes the instance of document objects
wordDocument.Close();
pdfDocument.Close(true);
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument("Template.docx", FormatType.Docx)
'Sets revision types to preserve track changes in PDF conversion.
wordDocument.RevisionOptions.ShowMarkup = RevisionType.Insertions Or RevisionType.Formatting Or RevisionType.Deletions
'Sets the color for Revision mark color.
wordDocument.RevisionOptions.RevisionBarsColor = RevisionColor.Pink
'Instantiation of DocToPDFConverter for Word to PDF conversion
Dim converter As DocToPDFConverter = New DocToPDFConverter
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
'Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf")
'Releases all resources used by the object
converter.Dispose()
'Closes the instance of document objects
wordDocument.Close()
pdfDocument.Close(True)
ShowInBalloons
Gets or sets the revision types to be displayed in balloons when converting Word documents to PDF. Default value is RevisionType.Deletions | RevisionType.Formatting.
Declaration
public RevisionType ShowInBalloons { get; set; }
Property Value
Type |
---|
RevisionType |
Remarks
For now, only RevisionType.None and RevisionType.Deletions | RevisionType.Formatting are supported.
Examples
The following code example demonstrates how to set the ShowInBalloons to hide balloons in Word to PDF Conversion.
//Loads an existing Word document
WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
//Sets revision types to preserve track changes in PDF conversion.
wordDocument.RevisionOptions.ShowMarkup = RevisionType.Insertions | RevisionType.Formatting | RevisionType.Deletions;
//Hides showing revisions in balloons when converting Word documents to PDF
wordDocument.RevisionOptions.ShowInBalloons = RevisionType.None;
//Instantiation of DocToPDFConverter for Word to PDF conversion
DocToPDFConverter converter = new DocToPDFConverter();
//Converts Word document into PDF document
PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
//Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf");
//Releases all resources used by the object
converter.Dispose();
//Closes the instance of document objects
wordDocument.Close();
pdfDocument.Close(true);
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument("Template.docx", FormatType.Docx)
'Sets revision types to preserve track changes in PDF conversion.
wordDocument.RevisionOptions.ShowMarkup = RevisionType.Insertions Or RevisionType.Formatting Or RevisionType.Deletions
'Hides showing revisions in balloons when converting Word documents to PDF
wordDocument.RevisionOptions.ShowInBalloons = RevisionType.None
'Instantiation of DocToPDFConverter for Word to PDF conversion
Dim converter As DocToPDFConverter = New DocToPDFConverter
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
'Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf")
'Releases all resources used by the object
converter.Dispose()
'Closes the instance of document objects
wordDocument.Close()
pdfDocument.Close(True)
ShowMarkup
Gets or sets the revision type to render in PDF.
Declaration
public RevisionType ShowMarkup { get; set; }
Property Value
Type |
---|
RevisionType |
Examples
The following code example demonstrates how to set the ShowMarkup to preserve track changes in Word to PDF Conversion.
//Loads an existing Word document
WordDocument wordDocument = new WordDocument("Template.docx", FormatType.Docx);
//Sets revision types to preserve track changes in PDF conversion.
wordDocument.RevisionOptions.ShowMarkup = RevisionType.Insertions | RevisionType.Formatting | RevisionType.Deletions;
//Instantiation of DocToPDFConverter for Word to PDF conversion
DocToPDFConverter converter = new DocToPDFConverter();
//Converts Word document into PDF document
PdfDocument pdfDocument = converter.ConvertToPDF(wordDocument);
//Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf");
//Releases all resources used by the object
converter.Dispose();
//Closes the instance of document objects
wordDocument.Close();
pdfDocument.Close(true);
'Loads an existing Word document
Dim wordDocument As WordDocument = New WordDocument("Template.docx", FormatType.Docx)
'Sets revision types to preserve track changes in PDF conversion.
wordDocument.RevisionOptions.ShowMarkup = RevisionType.Insertions Or RevisionType.Formatting Or RevisionType.Deletions
'Instantiation of DocToPDFConverter for Word to PDF conversion
Dim converter As DocToPDFConverter = New DocToPDFConverter
'Converts Word document into PDF document
Dim pdfDocument As PdfDocument = converter.ConvertToPDF(wordDocument)
'Saves the PDF file
pdfDocument.Save("WordtoPDF.pdf")
'Releases all resources used by the object
converter.Dispose()
'Closes the instance of document objects
wordDocument.Close()
pdfDocument.Close(True)