org.apache.pdfbox.preflight.graphic

## Class DeviceColorSpaceHelper

- java.lang.Object
- - org.apache.pdfbox.preflight.graphic.StandardColorSpaceHelper
  - - org.apache.pdfbox.preflight.graphic.DeviceColorSpaceHelper

All Implemented Interfaces:
  ColorSpaceHelper

    public class DeviceColorSpaceHelper
    extends StandardColorSpaceHelper

This class defines restrictions on Color Spaces. It checks the consistency of the Color space with the DestOutputIntent, if the color space isn't a Device Color space or a Indexed color space using Device the validation will fail.

### Field Summary

### Fields inherited from class org.apache.pdfbox.preflight.graphic.StandardColorSpaceHelper

`context, iccpw, pdcs`

### Constructor Summary

Constructors
Constructor and Description
`DeviceColorSpaceHelper(PreflightContext _context, org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace _cs)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected void` `processDeviceNColorSpace(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)` This method updates the given list with a ValidationError (ERROR_GRAPHIC_INVALID_PATTERN_COLOR_SPACE_FORBIDDEN) and returns false.
`protected void` `processIndexedColorSpace(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)` Indexed color space is authorized only if the BaseColorSpace is a DeviceXXX color space.
`protected void` `processPatternColorSpace(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)` This method updates the given list with a ValidationError (ERROR_GRAPHIC_INVALID_PATTERN_COLOR_SPACE_FORBIDDEN) and returns false.

### Methods inherited from class org.apache.pdfbox.preflight.graphic.StandardColorSpaceHelper

`processAllColorSpace, processCalibratedColorSpace, processCYMKColorSpace, processDefaultColorSpace, processGrayColorSpace, processICCBasedColorSpace, processRGBColorSpace, processSeparationColorSpace, validate`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DeviceColorSpaceHelper

    public DeviceColorSpaceHelper(PreflightContext _context,
                                  org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace _cs)

### Method Detail

#### processPatternColorSpace

    protected void processPatternColorSpace(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)

This method updates the given list with a ValidationError (ERROR_GRAPHIC_INVALID_PATTERN_COLOR_SPACE_FORBIDDEN) and returns false.

Overrides:
  `processPatternColorSpace` in class `StandardColorSpaceHelper`

#### processDeviceNColorSpace

    protected void processDeviceNColorSpace(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)

This method updates the given list with a ValidationError (ERROR_GRAPHIC_INVALID_PATTERN_COLOR_SPACE_FORBIDDEN) and returns false.

Overrides:
  `processDeviceNColorSpace` in class `StandardColorSpaceHelper`
Parameters:
  `colorSpace` - the color space object to check.

#### processIndexedColorSpace

    protected void processIndexedColorSpace(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)

Indexed color space is authorized only if the BaseColorSpace is a DeviceXXX color space. In all other cases the given list is updated with a ValidationError (ERROR_GRAPHIC_INVALID_PATTERN_COLOR_SPACE_FORBIDDEN) and returns false.

Overrides:
  `processIndexedColorSpace` in class `StandardColorSpaceHelper`
Parameters:
  `colorSpace` - the color space object to check.