Class StandardColorSpaceHelper

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected PreflightContext context
      The context which contains useful information to process the validation.
      protected ICCProfileWrapper iccpw
      The ICCProfile contained in the DestOutputIntent
      protected org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace pdcs
      High level object which represents the colors space to check.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void processAllColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
      Method called by the validate method.
      protected void processCalibratedColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
      Method called by the processAllColorSpace if the ColorSpace to check is a calibrated color (CalGray, CalRGB, Lab).
      protected void processCYMKColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
      Method called by the processAllColorSpace if the ColorSpace to check is DeviceCYMK.
      protected boolean processDefaultColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
      Look up in the closest PDResources objects if there are a default ColorSpace.
      protected void processDeviceNColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
      Method called by the processAllColorSpace if the ColorSpace to check is DeviceN.
      protected void processGrayColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
      Method called by the processAllColorSpace if the ColorSpace to check is DeviceGray.
      protected void processICCBasedColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
      Method called by the processAllColorSpace if the ColorSpace to check is a ICCBased color space.
      protected void processIndexedColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
      Method called by the processAllColorSpace if the ColorSpace to check is Indexed.
      protected void processPatternColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
      Method called by the processAllColorSpace if the ColorSpace to check is a Pattern.
      protected void processRGBColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
      Method called by the processAllColorSpace if the ColorSpace to check is DeviceRGB.
      protected void processSeparationColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
      Method called by the processAllColorSpace if the ColorSpace to check is Separation.
      void validate()
      Process the ColorSpace validation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • context

        protected PreflightContext context
        The context which contains useful information to process the validation.
      • iccpw

        protected ICCProfileWrapper iccpw
        The ICCProfile contained in the DestOutputIntent
      • pdcs

        protected org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace pdcs
        High level object which represents the colors space to check.
    • Constructor Detail

      • StandardColorSpaceHelper

        protected StandardColorSpaceHelper​(PreflightContext _context,
                                           org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace _cs)
    • Method Detail

      • processAllColorSpace

        protected final void processAllColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
        Method called by the validate method. According to the ColorSpace, a specific ColorSpace method is called.
        Parameters:
        colorSpace - the color space object to check.
      • processRGBColorSpace

        protected void processRGBColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
        Method called by the processAllColorSpace if the ColorSpace to check is DeviceRGB.
      • processCYMKColorSpace

        protected void processCYMKColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
        Method called by the processAllColorSpace if the ColorSpace to check is DeviceCYMK.
      • processPatternColorSpace

        protected void processPatternColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
        Method called by the processAllColorSpace if the ColorSpace to check is a Pattern.
        Parameters:
        colorSpace -
      • processGrayColorSpace

        protected void processGrayColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
        Method called by the processAllColorSpace if the ColorSpace to check is DeviceGray.
      • processCalibratedColorSpace

        protected void processCalibratedColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
        Method called by the processAllColorSpace if the ColorSpace to check is a calibrated color (CalGray, CalRGB, Lab).
        Parameters:
        colorSpace -
      • processICCBasedColorSpace

        protected void processICCBasedColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
        Method called by the processAllColorSpace if the ColorSpace to check is a ICCBased color space. Because this kind of ColorSpace can have alternate color space, the processAllColorSpace is called to check this alternate color space. (Pattern is forbidden as Alternate Color Space)
        Parameters:
        colorSpace - the color space object to check.
      • processDeviceNColorSpace

        protected void processDeviceNColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
        Method called by the processAllColorSpace if the ColorSpace to check is DeviceN. Because this kind of ColorSpace can have alternate color space, the processAllColorSpace is called to check this alternate color space. (There are no restrictions on the Alternate Color space)
        Parameters:
        colorSpace - the color space object to check.
      • processIndexedColorSpace

        protected void processIndexedColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
        Method called by the processAllColorSpace if the ColorSpace to check is Indexed. Because this kind of ColorSpace can have a Base color space, the processAllColorSpace is called to check this base color space. (Indexed and Pattern can't be a Base color space)
        Parameters:
        colorSpace - the color space object to check.
      • processSeparationColorSpace

        protected void processSeparationColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
        Method called by the processAllColorSpace if the ColorSpace to check is Separation. Because this kind of ColorSpace can have an alternate color space, the processAllColorSpace is called to check this alternate color space. (Indexed, Separation, DeviceN and Pattern can't be a Base color space)
        Parameters:
        colorSpace - the color space object to check.
      • processDefaultColorSpace

        protected boolean processDefaultColorSpace​(org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace colorSpace)
        Look up in the closest PDResources objects if there are a default ColorSpace. If there are, check that is a authorized ColorSpace.
        Parameters:
        colorSpace -
        Returns:
        true if the default colorspace is a right one, false otherwise.