public abstract class AbstractCsConverter extends Object implements ICsConverter
Constructor and Description |
---|
AbstractCsConverter(CsConverterProperties csConverterProperties) |
Modifier and Type | Method and Description |
---|---|
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.
|
com.itextpdf.kernel.pdf.PdfArray |
convertAnnotationIcArray(com.itextpdf.kernel.pdf.PdfArray icArray)
Converts annotation interior color array by using of current color converter.
|
com.itextpdf.kernel.pdf.PdfStream |
convertContentStream(com.itextpdf.kernel.pdf.PdfStream stream, 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 passed image in original color space to image in target color space.
|
protected List |
convertOperatorParameters(List
Converts passed operator parameters color space.
|
void |
convertStoredResources(OptimizationSession session)
Converts color space of the stored content stream resources.
|
protected abstract ColorConverter |
getColorConverter()
Gets ColorConverter for appropriate convertion.
|
CsConverterProperties |
getConverterProperties()
Gets current converter properties instance.
|
protected abstract Class extends com.itextpdf.kernel.pdf.colorspace.PdfColorSpace> |
getOriginalCsClass()
Gets original color space class.
|
public AbstractCsConverter(CsConverterProperties csConverterProperties)
public com.itextpdf.kernel.pdf.xobject.PdfImageXObject convertImageCs(com.itextpdf.kernel.pdf.xobject.PdfImageXObject imageToConvert, OptimizationSession session)
convertImageCs
in interface ICsConverter
imageToConvert
- the image in original color space
session
- is an auxiliary object used to support share data between stages of optimization process
public com.itextpdf.kernel.pdf.PdfStream convertContentStream(com.itextpdf.kernel.pdf.PdfStream stream, com.itextpdf.kernel.pdf.PdfResources externalResources, OptimizationSession session)
convertStoredResources(OptimizationSession)
method.
convertContentStream
in interface ICsConverter
stream
- 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
public void convertStoredResources(OptimizationSession session)
convertContentStream(PdfStream, PdfResources, OptimizationSession)
method. Note that this method should be called after all content streams have been processed.
convertStoredResources
in interface ICsConverter
session
- is an auxiliary object used to support share data between stages of optimization process
public com.itextpdf.kernel.pdf.PdfArray convertAnnotationIcArray(com.itextpdf.kernel.pdf.PdfArray icArray)
convertAnnotationIcArray
in interface ICsConverter
icArray
- the interior color array
public void attemptToConvertTransparencyGroup(com.itextpdf.kernel.pdf.PdfObject groupEntryHolder, OptimizationSession session)
ICsConverter
attemptToConvertTransparencyGroup
in interface ICsConverter
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
public CsConverterProperties getConverterProperties()
ICsConverter
getConverterProperties
in interface ICsConverter
protected abstract Class extends com.itextpdf.kernel.pdf.colorspace.PdfColorSpace> getOriginalCsClass()
protected abstract ColorConverter getColorConverter()
ColorConverter
for appropriate convertion. The result of this method is used for conversion and for filling necessary fields in converted PDF object.
Copyright © 1998–2022 iText Group NV. All rights reserved.