com.aspose.words

Class ColorMode

  • java.lang.Object
    • com.aspose.words.ColorMode
public class ColorMode 
extends java.lang.Object

Utility class containing constants. Specifies how colors are rendered.

Example:

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

// Configure PdfSaveOptions to save every image in the input document in greyscale during conversion
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
{
    pdfSaveOptions.setColorMode(ColorMode.GRAYSCALE);
}

doc.save(getArtifactsDir() + "PdfSaveOptions.ColorRendering.pdf", pdfSaveOptions);

Field Summary
static final intNORMAL = 0
Rendering with unmodified colors.
static final intGRAYSCALE = 1
Rendering with colors in a range of gray shades from white to black.
 

    • Field Detail

      • NORMAL = 0

        public static final int NORMAL
        Rendering with unmodified colors.
      • GRAYSCALE = 1

        public static final int GRAYSCALE
        Rendering with colors in a range of gray shades from white to black.