Class ColorSpaceConverter


public class ColorSpaceConverter extends AbstractOptimizationHandler
This is the class is used to convert color space of objects located in the transferred PdfDocument.
  • Constructor Details

    • ColorSpaceConverter

      public ColorSpaceConverter()
  • Method Details

    • getCsConverter

      public ICsConverter getCsConverter()
      Gets a current color space converter instance.
      a current ICsConverter instance
    • setCsConverter

      public ColorSpaceConverter setCsConverter (ICsConverter csConverter)
      Sets a color space converter instance.
      csConverter - is a converter to set
      this instance
    • optimizePdf

      protected void optimizePdf (com.itextpdf.kernel.pdf.PdfDocument document, OptimizationSession session)
      The method searches across all the document and for each found PdfImageXObject performs an color converting according with defined color space converter. And performs an color converting for content streams and their resources. And removes PDF\A id schemas from PDF XMP metadata.
      Specified by:
      optimizePdf in class AbstractOptimizationHandler
      document - is the PDF document to optimize. Invocation of the method can change the state of the object
      session - is an auxiliary object used to support share data between stages of optimization process