Class ColorSpaceConverter
java.lang.Object
com.itextpdf.pdfoptimizer.AbstractOptimizationHandler
com.itextpdf.pdfoptimizer.handlers.ColorSpaceConverter
This is the class is used to convert color space of objects located in the transferred
PdfDocument
.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets a current color space converter instance.protected void
optimizePdf
(com.itextpdf.kernel.pdf.PdfDocument document, OptimizationSession session) The method searches across all the document and for each foundPdfImageXObject
performs an color converting according with defined color space converter.setCsConverter
(ICsConverter csConverter) Sets a color space converter instance.
-
Constructor Details
-
ColorSpaceConverter
public ColorSpaceConverter()
-
-
Method Details
-
getCsConverter
Gets a current color space converter instance.- Returns:
-
a current
ICsConverter
instance
-
setCsConverter
Sets a color space converter instance.- Parameters:
-
csConverter
- is a converter to set - Returns:
- this instance
-
optimizePdf
protected void optimizePdf(com.itextpdf.kernel.pdf.PdfDocument document, OptimizationSession session) The method searches across all the document and for each foundPdfImageXObject
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 classAbstractOptimizationHandler
- Parameters:
-
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
-