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 Description DeviceColorSpaceHelper(PreflightContext _context, PDColorSpace _cs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
processDeviceNColorSpace(PDColorSpace colorSpace)
This method updates the given list with a ValidationError (ERROR_GRAPHIC_INVALID_PATTERN_COLOR_SPACE_FORBIDDEN) and returns false.protected void
processIndexedColorSpace(PDColorSpace colorSpace)
Indexed color space is authorized only if the BaseColorSpace is a DeviceXXX color space.protected void
processPatternColorSpace(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
-
-
-
-
Constructor Detail
-
DeviceColorSpaceHelper
public DeviceColorSpaceHelper(PreflightContext _context, PDColorSpace _cs)
-
-
Method Detail
-
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 classStandardColorSpaceHelper
-
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 classStandardColorSpaceHelper
- 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 classStandardColorSpaceHelper
- Parameters:
colorSpace
- the color space object to check.
-
-