Below are revisions for this snippet.

Java code for Changing Color Space of PDF Document


Revision Revison 1
This code shows how java developers can change color space of PDF document from RGB color to CMYK and vice versa by using Aspose.PDF for Java Library. The following methods have been implemented in the Operator class for changing colors. Use it to change some specific RGB/CMYK colors to CMYK/RGB color space, keeping the remaining PDF document as it is.

• com.aspose.pdf.Operator.SetRGBColorStroke.getCMYKColor(new double[3], new double[4])
• com.aspose.pdf.Operator.SetRGBColor.getCMYKColor(new double[3], new double[4])
• com.aspose.pdf.Operator.SetCMYKColorStroke.getRGBColor(new double[4], new double[3])
• com.aspose.pdf.Operator.SetCMYKColor.getRGBColor(new double[4], new double[3])