Interface ICsConverter
- All Known Implementing Classes:
-
AbstractCsConverter
,CmykToRgbCsConverter
,RgbToCmykCsConverter
public interface ICsConverter
Interface for color space converting of PDF objects.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
attemptToConvertTransparencyGroup
(com.itextpdf.kernel.pdf.PdfObject groupEntryHolder, OptimizationSession session) Attempt to converts transparency group dictionary which stored in passed groupEntryHolder PDF object, if this groupEntryHolder can store transparency group by PDF specification.com.itextpdf.kernel.pdf.PdfArray
convertAnnotationIcArray
(com.itextpdf.kernel.pdf.PdfArray icArray) Converts annotation interior color array.com.itextpdf.kernel.pdf.PdfStream
convertContentStream
(com.itextpdf.kernel.pdf.PdfStream contentStream, com.itextpdf.kernel.pdf.PdfResources externalResources, OptimizationSession session) Converts color space of the passed content stream.com.itextpdf.kernel.pdf.xobject.PdfImageXObject
convertImageCs
(com.itextpdf.kernel.pdf.xobject.PdfImageXObject imageToConvert, OptimizationSession session) Converts color space of passed image.void
Converts color space of the stored content stream resources.Gets current converter properties instance.
-
Method Details
-
convertImageCs
com.itextpdf.kernel.pdf.xobject.PdfImageXObject convertImageCs(com.itextpdf.kernel.pdf.xobject.PdfImageXObject imageToConvert, OptimizationSession session) Converts color space of passed image.- Parameters:
-
imageToConvert
- the image for which color space should be converting -
session
- is an auxiliary object used to support share data between stages of optimization process - Returns:
- the image with converted color space if converting can be performed and the same instance otherwise
-
convertContentStream
com.itextpdf.kernel.pdf.PdfStream convertContentStream(com.itextpdf.kernel.pdf.PdfStream contentStream, com.itextpdf.kernel.pdf.PdfResources externalResources, OptimizationSession session) Converts color space of the passed content stream. Note that this method does not process content stream resources and passed external resources. This method doesn't convert transparency group entry, for it useattemptToConvertTransparencyGroup(PdfObject, OptimizationSession)
method.- Parameters:
-
contentStream
- the PDF content stream instance for conversion -
externalResources
- the external content stream resources. Used in the case when the page content stream is converted, and the resources are stored not in the content stream but in the page dictionary. In other case should be null -
session
- is an auxiliary object used to support share data between stages of optimization process - Returns:
- the content stream with converted color space if converting can be performed and the same instance otherwise
-
convertStoredResources
Converts color space of the stored content stream resources.- Parameters:
-
session
- is an auxiliary object used to support share data between stages of optimization process
-
convertAnnotationIcArray
com.itextpdf.kernel.pdf.PdfArray convertAnnotationIcArray(com.itextpdf.kernel.pdf.PdfArray icArray) Converts annotation interior color array.- Parameters:
-
icArray
- the interior color array - Returns:
- the converted interior color array if converting can be performed and the same instance otherwise
-
attemptToConvertTransparencyGroup
void attemptToConvertTransparencyGroup(com.itextpdf.kernel.pdf.PdfObject groupEntryHolder, OptimizationSession session) Attempt to converts transparency group dictionary which stored in passed groupEntryHolder PDF object, if this groupEntryHolder can store transparency group by PDF specification.- Parameters:
-
groupEntryHolder
- the PDF object which stored transparency group dictionary to convert -
session
- is an auxiliary object used to support share data between stages of optimization process
-
getConverterProperties
CsConverterProperties getConverterProperties()Gets current converter properties instance.- Returns:
- the converter properties instance
-