Click or drag to resize

ColorMode Enumeration

Specifies how colors are rendered.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 21.5.0

ExpandedSyntax

public enum ColorMode

ExpandedMembers

  Member nameValueDescription
Normal0 Rendering with unmodified colors.
Grayscale1 Rendering with colors in a range of gray shades from white to black.

ExpandedExamples

Shows how to change image color with saving options property.
Document doc = new Document(MyDir + "Images.docx");

// Create a "PdfSaveOptions" object that we can pass to the document's "Save" method
// to modify how that method converts the document to .PDF.
// Set the "ColorMode" property to "Grayscale" to render all images from the document in black and white.
// The size of the output document may be larger with this setting.
// Set the "ColorMode" property to "Normal" to render all images in color.
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions { ColorMode = colorMode };

doc.Save(ArtifactsDir + "PdfSaveOptions.ColorRendering.pdf", pdfSaveOptions);

ExpandedSee Also