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.
  • Constructor Details

  • Method Details

    • processPatternColorSpace

      protected void processPatternColorSpace(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(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(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.