Class PdfExtGState
- java.lang.Object
-
- com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
-
- com.itextpdf.kernel.pdf.extgstate.PdfExtGState
-
public class PdfExtGState extends PdfObjectWrapper<PdfDictionary>
Graphics state parameter dictionary wrapper. See ISO-320001, 8.4.5 Graphics State Parameter Dictionaries.
-
-
Field Summary
Fields Modifier and Type Field Description static PdfNameBM_COLORStandard nonseparable blend mode.static PdfNameBM_COLOR_BURNStandard separable blend mode.static PdfNameBM_COLOR_DODGEStandard separable blend mode.static PdfNameBM_DARKENStandard separable blend mode.static PdfNameBM_DIFFERENCEStandard separable blend mode.static PdfNameBM_EXCLUSIONStandard separable blend mode.static PdfNameBM_HARD_LIGHTStandard separable blend mode.static PdfNameBM_HUEStandard nonseparable blend mode.static PdfNameBM_LIGHTENStandard separable blend mode.static PdfNameBM_LUMINOSITYStandard nonseparable blend mode.static PdfNameBM_MULTIPLYStandard separable blend mode.static PdfNameBM_NORMALStandard separable blend mode.static PdfNameBM_OVERLAYStandard separable blend mode.static PdfNameBM_SATURATIONStandard nonseparable blend mode.static PdfNameBM_SCREENStandard separable blend mode.static PdfNameBM_SOFT_LIGHTStandard separable blend mode.
-
Constructor Summary
Constructors Constructor Description PdfExtGState()Create default instance of graphics state parameter dictionaryPdfExtGState(PdfDictionary pdfObject)Create instance of graphics state parameter dictionary wrapper by existedPdfDictionaryobject
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()To manually flush aPdfObjectbehind this wrapper, you have to ensure that this object is added to the document, i.e.java.lang.BooleangetAlphaSourceFlag()Gets the alpha source flag ("alpha is shape"), specifying whether the current soft mask and alpha constant shall be interpreted as shape values (true) or opacity values (false),AISkey.java.lang.BooleangetAutomaticStrokeAdjustmentFlag()Gets value of an automatic stroke adjustment flag,SAkey.PdfObjectgetBlackGenerationFunction()Gets the black-generation function value,BG.PdfObjectgetBlackGenerationFunction2()Gets the black-generation function value orDefault,BG2key.PdfObjectgetBlendMode()Gets the current blend mode for the transparent imaging model,BMkey.PdfArraygetDashPattern()Gets line dash pattern value,Dkey.java.lang.FloatgetFillOpacity()Gets the current alpha constant, specifying the constant shape or constant opacity value for non-stroking operations in the transparent imaging model,cakey.java.lang.BooleangetFillOverprintFlag()Get overprint flag value for non-stroking operations,opkey.java.lang.FloatgetFlatnessTolerance()Gets the flatness tolerance value,FLkey.PdfArraygetFont()Gets font and size,Fontkey.PdfObjectgetHalftone()Gets the halftone dictionary, stream orDefault,HTkey.float[]getHalftoneOrigin()PDF 2.0.java.lang.IntegergetLineCapStyle()Gets line gap style value,LCkey.java.lang.IntegergetLineJoinStyle()Gets line join style value,LJkey.java.lang.FloatgetLineWidth()Gets line width value,LWkey.java.lang.FloatgetMiterLimit()Gets miter limit value,ML key.java.lang.IntegergetOverprintMode()Get overprint control mode,OPMkey.PdfNamegetRenderingIntent()Gets rendering intent value,RIkey.java.lang.FloatgetSmothnessTolerance()Gets the smoothness tolerance value,SMkey.PdfObjectgetSoftMask()Gets the current soft mask,SMaskkey.java.lang.FloatgetStrokeOpacity()Gets the current alpha constant, specifying the constant shape or constant opacity value for stroking operations in the transparent imaging model,CAkey.java.lang.BooleangetStrokeOverprintFlag()Get overprint flag value for stroking operations,OPkey.java.lang.BooleangetTextKnockoutFlag()Gets the text knockout flag, which determine the behaviour of overlapping glyphs within a text object in the transparent imaging model,TKkey.PdfObjectgetTransferFunction()Gets the transfer function value,TRkey.PdfObjectgetTransferFunction2()Gets the transfer function value orDefault,TR2key.PdfObjectgetUndercolorRemovalFunction()Gets the undercolor-removal function,UCRkey.PdfObjectgetUndercolorRemovalFunction2()Gets the undercolor-removal function value orDefault,UCR2key.java.lang.BooleanisBlackPointCompensationUsed()PDF 2.0.protected booleanisWrappedObjectMustBeIndirect()Defines if the object behind this wrapper must be an indirect object in the resultant document.PdfExtGStateput(PdfName key, PdfObject value)Puts the value into Graphics state parameter dictionary and associates it with the specified key.PdfExtGStatesetAlphaSourceFlag(boolean alphaSourceFlag)Sets the alpha source flag ("alpha is shape"), specifying whether the current soft mask and alpha constant shall be interpreted as shape values (true) or opacity values (false),AISkey.PdfExtGStatesetAutomaticStrokeAdjustmentFlag(boolean strokeAdjustment)Sets value of an automatic stroke adjustment flag,SAkey.PdfExtGStatesetBlackGenerationFunction(PdfObject blackGenerationFunction)Sets the black-generation function value,BG.PdfExtGStatesetBlackGenerationFunction2(PdfObject blackGenerationFunction2)Sets the black-generation function value orDefault,BG2key.PdfExtGStatesetBlendMode(PdfObject blendMode)Sets the current blend mode for the transparent imaging model,BMkey.PdfExtGStatesetDashPattern(PdfArray dashPattern)Sets line dash pattern value,Dkey.PdfExtGStatesetFillOpacity(float fillingAlphaConstant)Sets the current alpha constant, specifying the constant shape or constant opacity value for non-stroking operations in the transparent imaging model,cakey.PdfExtGStatesetFillOverPrintFlag(boolean fillOverprintFlag)Set overprint flag value for non-stroking operations,opkey.PdfExtGStatesetFlatnessTolerance(float flatnessTolerance)Sets the flatness tolerance value,FLkey.PdfExtGStatesetFont(PdfArray font)Sets font and size,Fontkey.PdfExtGStatesetHalftone(PdfObject halftone)Sets the halftone orDefault,HTkey.PdfExtGStatesetHalftoneOrigin(float x, float y)PDF 2.0.PdfExtGStatesetLineCapStyle(int lineCapStyle)Sets line gap style value,LCkey.PdfExtGStatesetLineJoinStyle(int lineJoinStyle)Sets line join style value,LJkey.PdfExtGStatesetLineWidth(float lineWidth)Sets line width value,LWkey.PdfExtGStatesetMiterLimit(float miterLimit)Sets miter limit value,ML key.PdfExtGStatesetOverprintMode(int overprintMode)Set overprint control mode,OPMkey.PdfExtGStatesetRenderingIntent(PdfName renderingIntent)Sets rendering intent value,RIkey.PdfExtGStatesetSmoothnessTolerance(float smoothnessTolerance)Sets the smoothness tolerance value,SMkey.PdfExtGStatesetSoftMask(PdfObject sMask)Sets the current soft mask,SMaskkey.PdfExtGStatesetStrokeOpacity(float strokingAlphaConstant)Sets the current alpha constant, specifying the constant shape or constant opacity value for stroking operations in the transparent imaging model,CAkey.PdfExtGStatesetStrokeOverPrintFlag(boolean strokeOverPrintFlag)Set overprint flag value for stroking operations,OPkey.PdfExtGStatesetTextKnockoutFlag(boolean textKnockoutFlag)Sets the text knockout flag, which determine the behaviour of overlapping glyphs within a text object in the transparent imaging model,TKkey.PdfExtGStatesetTransferFunction(PdfObject transferFunction)Sets the transfer function value,TRkey.PdfExtGStatesetTransferFunction2(PdfObject transferFunction2)Sets the transfer function value orDefault,TR2key.PdfExtGStatesetUndercolorRemovalFunction(PdfObject undercolorRemovalFunction)Sets the undercolor-removal function,UCRkey.PdfExtGStatesetUndercolorRemovalFunction2(PdfObject undercolorRemovalFunction2)Sets the undercolor-removal function value orDefault,UCR2key.PdfExtGStatesetUseBlackPointCompensation(boolean useBlackPointCompensation)PDF 2.0.-
Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
-
-
-
Field Detail
-
BM_NORMAL
public static final PdfName BM_NORMAL
Standard separable blend mode. See ISO-320001, table 136
-
BM_MULTIPLY
public static final PdfName BM_MULTIPLY
Standard separable blend mode. See ISO-320001, table 136
-
BM_SCREEN
public static final PdfName BM_SCREEN
Standard separable blend mode. See ISO-320001, table 136
-
BM_OVERLAY
public static final PdfName BM_OVERLAY
Standard separable blend mode. See ISO-320001, table 136
-
BM_DARKEN
public static final PdfName BM_DARKEN
Standard separable blend mode. See ISO-320001, table 136
-
BM_LIGHTEN
public static final PdfName BM_LIGHTEN
Standard separable blend mode. See ISO-320001, table 136
-
BM_COLOR_DODGE
public static final PdfName BM_COLOR_DODGE
Standard separable blend mode. See ISO-320001, table 136
-
BM_COLOR_BURN
public static final PdfName BM_COLOR_BURN
Standard separable blend mode. See ISO-320001, table 136
-
BM_HARD_LIGHT
public static final PdfName BM_HARD_LIGHT
Standard separable blend mode. See ISO-320001, table 136
-
BM_SOFT_LIGHT
public static final PdfName BM_SOFT_LIGHT
Standard separable blend mode. See ISO-320001, table 136
-
BM_DIFFERENCE
public static final PdfName BM_DIFFERENCE
Standard separable blend mode. See ISO-320001, table 136
-
BM_EXCLUSION
public static final PdfName BM_EXCLUSION
Standard separable blend mode. See ISO-320001, table 136
-
BM_HUE
public static final PdfName BM_HUE
Standard nonseparable blend mode. See ISO-320001, table 137
-
BM_SATURATION
public static final PdfName BM_SATURATION
Standard nonseparable blend mode. See ISO-320001, table 137
-
BM_COLOR
public static final PdfName BM_COLOR
Standard nonseparable blend mode. See ISO-320001, table 137
-
BM_LUMINOSITY
public static final PdfName BM_LUMINOSITY
Standard nonseparable blend mode. See ISO-320001, table 137
-
-
Constructor Detail
-
PdfExtGState
public PdfExtGState(PdfDictionary pdfObject)
Create instance of graphics state parameter dictionary wrapper by existedPdfDictionaryobject- Parameters:
pdfObject- instance of graphics state parameter dictionary
-
PdfExtGState
public PdfExtGState()
Create default instance of graphics state parameter dictionary
-
-
Method Detail
-
getLineWidth
public java.lang.Float getLineWidth()
Gets line width value,LWkey.- Returns:
- a
floatvalue if exist, otherwisenull.
-
setLineWidth
public PdfExtGState setLineWidth(float lineWidth)
Sets line width value,LWkey.- Parameters:
lineWidth- afloatvalue.- Returns:
- object itself.
-
getLineCapStyle
public java.lang.Integer getLineCapStyle()
Gets line gap style value,LCkey.- Returns:
- 0 - butt cap, 1 - round cap, 2 - projecting square cap.
-
setLineCapStyle
public PdfExtGState setLineCapStyle(int lineCapStyle)
Sets line gap style value,LCkey.- Parameters:
lineCapStyle- 0 - butt cap, 1 - round cap, 2 - projecting square cap.- Returns:
- object itself.
-
getLineJoinStyle
public java.lang.Integer getLineJoinStyle()
Gets line join style value,LJkey.- Returns:
- 0 - miter join (see also miter limit), 1 - round join, 2 - bevel join.
-
setLineJoinStyle
public PdfExtGState setLineJoinStyle(int lineJoinStyle)
Sets line join style value,LJkey.- Parameters:
lineJoinStyle- 0 - miter join (see also miter limit), 1 - round join, 2 - bevel join.- Returns:
- object itself.
-
getMiterLimit
public java.lang.Float getMiterLimit()
Gets miter limit value,ML key. See also line join style.- Returns:
- a
floatvalue if exist, otherwisenull.
-
setMiterLimit
public PdfExtGState setMiterLimit(float miterLimit)
Sets miter limit value,ML key. See also line join style.- Parameters:
miterLimit- afloatvalue.- Returns:
- object itself.
-
getDashPattern
public PdfArray getDashPattern()
Gets line dash pattern value,Dkey.- Returns:
- a
PdfArray, that represents line dash pattern.
-
setDashPattern
public PdfExtGState setDashPattern(PdfArray dashPattern)
Sets line dash pattern value,Dkey.- Parameters:
dashPattern- aPdfArray, that represents line dash pattern.- Returns:
- object itself.
-
getRenderingIntent
public PdfName getRenderingIntent()
Gets rendering intent value,RIkey. Valid values are:AbsoluteColorimetric,RelativeColorimetric,Saturation,Perceptual.- Returns:
- a
PdfNameinstance.
-
setRenderingIntent
public PdfExtGState setRenderingIntent(PdfName renderingIntent)
Sets rendering intent value,RIkey.- Parameters:
renderingIntent- aPdfNameinstance, Valid values are:AbsoluteColorimetric,RelativeColorimetric,Saturation,Perceptual.- Returns:
- object itself.
-
getStrokeOverprintFlag
public java.lang.Boolean getStrokeOverprintFlag()
Get overprint flag value for stroking operations,OPkey.- Returns:
- a
booleanvalue if exist, otherwisenull.
-
setStrokeOverPrintFlag
public PdfExtGState setStrokeOverPrintFlag(boolean strokeOverPrintFlag)
Set overprint flag value for stroking operations,OPkey.- Parameters:
strokeOverPrintFlag-true, for applying overprint for stroking operations.- Returns:
- object itself.
-
getFillOverprintFlag
public java.lang.Boolean getFillOverprintFlag()
Get overprint flag value for non-stroking operations,opkey.- Returns:
- a
booleanvalue if exist, otherwisenull.
-
setFillOverPrintFlag
public PdfExtGState setFillOverPrintFlag(boolean fillOverprintFlag)
Set overprint flag value for non-stroking operations,opkey.- Parameters:
fillOverprintFlag-true, for applying overprint for non-stroking operations.- Returns:
- object itself.
-
getOverprintMode
public java.lang.Integer getOverprintMode()
Get overprint control mode,OPMkey.- Returns:
- an
intvalue if exist, otherwisenull.
-
setOverprintMode
public PdfExtGState setOverprintMode(int overprintMode)
Set overprint control mode,OPMkey.- Parameters:
overprintMode- anintvalue, see ISO-320001, 8.6.7 Overprint Control.- Returns:
- object itself.
-
getFont
public PdfArray getFont()
Gets font and size,Fontkey.- Returns:
- a
PdfArrayof the form[font size], wherefontshall be an indirect reference to a font dictionary andsizeshall be a number expressed in text space units.
-
setFont
public PdfExtGState setFont(PdfArray font)
Sets font and size,Fontkey. NOTE: If you want add the font object which has just been created, make sure to register the font withPdfDocument.addFont(PdfFont)method first.- Parameters:
font- aPdfArrayof the form[font size], wherefontshall be an indirect reference to a font dictionary andsizeshall be a number expressed in text space units.- Returns:
- object itself.
-
getBlackGenerationFunction
public PdfObject getBlackGenerationFunction()
Gets the black-generation function value,BG.- Returns:
- a
PdfObject, should be an object representing custom function (seeIPdfFunctionobject wrapper for convenience API in reading/manipulating such function objects).
-
setBlackGenerationFunction
public PdfExtGState setBlackGenerationFunction(PdfObject blackGenerationFunction)
Sets the black-generation function value,BG.- Parameters:
blackGenerationFunction- aPdfObject, shall be an object representing custom function (seeIPdfFunctionobject wrapper for convenience API in reading/manipulating such function objects).- Returns:
- object itself.
-
getBlackGenerationFunction2
public PdfObject getBlackGenerationFunction2()
Gets the black-generation function value orDefault,BG2key.- Returns:
- the returned value is
PdfObjectvalue, which is either aPdfNameof a predefined value or an object representing custom function (seeIPdfFunctionobject wrapper for convenience API in reading/manipulating such function objects).
-
setBlackGenerationFunction2
public PdfExtGState setBlackGenerationFunction2(PdfObject blackGenerationFunction2)
Sets the black-generation function value orDefault,BG2key. Note, if bothBGandBG2are present in the same graphics state parameter dictionary,BG2takes precedence.- Parameters:
blackGenerationFunction2- aPdfObjectvalue, shall be an object representing custom function (seeIPdfFunctionobject wrapper for convenience API in reading/manipulating such function objects) orDefault.- Returns:
- object itself.
-
getUndercolorRemovalFunction
public PdfObject getUndercolorRemovalFunction()
Gets the undercolor-removal function,UCRkey.- Returns:
- a
PdfObject, should be an object representing custom function (seeIPdfFunctionobject wrapper for convenience API in reading/manipulating such function objects).
-
setUndercolorRemovalFunction
public PdfExtGState setUndercolorRemovalFunction(PdfObject undercolorRemovalFunction)
Sets the undercolor-removal function,UCRkey.- Parameters:
undercolorRemovalFunction- aPdfObject, shall be an object representing custom function (seeIPdfFunctionobject wrapper for convenience API in reading/manipulating such function objects).- Returns:
- object itself.
-
getUndercolorRemovalFunction2
public PdfObject getUndercolorRemovalFunction2()
Gets the undercolor-removal function value orDefault,UCR2key.- Returns:
- the returned value is
PdfObjectvalue, which is either aPdfNameof a predefined value or an object representing custom function (seeIPdfFunctionobject wrapper for convenience API in reading/manipulating such function objects).
-
setUndercolorRemovalFunction2
public PdfExtGState setUndercolorRemovalFunction2(PdfObject undercolorRemovalFunction2)
Sets the undercolor-removal function value orDefault,UCR2key. Note, if bothUCRandUCR2are present in the same graphics state parameter dictionary,UCR2takes precedence.- Parameters:
undercolorRemovalFunction2- aPdfObjectvalue, shall be an object representing custom function (seeIPdfFunctionobject wrapper for convenience API in reading/manipulating such function objects) orDefault.- Returns:
- object itself.
-
getTransferFunction
public PdfObject getTransferFunction()
Gets the transfer function value,TRkey.- Returns:
- the returned value is
PdfObjectvalue, which is either aPdfNameorPdfArrayof a predefined value or an object representing custom function (seeIPdfFunctionobject wrapper for convenience API in reading/manipulating such function objects).
-
setTransferFunction
public PdfExtGState setTransferFunction(PdfObject transferFunction)
Sets the transfer function value,TRkey.- Parameters:
transferFunction- aPdfObject, shall be either aPdfNameorPdfArrayof a predefined value or an object representing custom function (seeIPdfFunctionobject wrapper for convenience API in reading/manipulating such function objects).- Returns:
- object itself.
-
getTransferFunction2
public PdfObject getTransferFunction2()
Gets the transfer function value orDefault,TR2key.- Returns:
- the returned value is
PdfObjectvalue, which is either aPdfNameorPdfArrayof a predefined value or an object representing custom function (seeIPdfFunctionobject wrapper for convenience API in reading/manipulating such function objects).
-
setTransferFunction2
public PdfExtGState setTransferFunction2(PdfObject transferFunction2)
Sets the transfer function value orDefault,TR2key. Note, if bothTRandTR2are present in the same graphics state parameter dictionary,TR2takes precedence.- Parameters:
transferFunction2- aPdfObject, shall be either aPdfNameorPdfArrayof a predefined value or an object representing custom function (seeIPdfFunctionobject wrapper for convenience API in reading/manipulating such function objects).- Returns:
- object itself.
-
getHalftone
public PdfObject getHalftone()
Gets the halftone dictionary, stream orDefault,HTkey.- Returns:
- a
PdfObject, should be eitherPdfDictionary,PdfStreamorPdfName.
-
setHalftone
public PdfExtGState setHalftone(PdfObject halftone)
Sets the halftone orDefault,HTkey.- Parameters:
halftone- aPdfObject, shall be eitherPdfDictionary,PdfStreamorPdfName.- Returns:
- object itself.
-
getFlatnessTolerance
public java.lang.Float getFlatnessTolerance()
Gets the flatness tolerance value,FLkey.- Returns:
- a
floatvalue if exist, otherwisenull.
-
setFlatnessTolerance
public PdfExtGState setFlatnessTolerance(float flatnessTolerance)
Sets the flatness tolerance value,FLkey.- Parameters:
flatnessTolerance- afloatvalue.- Returns:
- object itself.
-
getSmothnessTolerance
public java.lang.Float getSmothnessTolerance()
Gets the smoothness tolerance value,SMkey.- Returns:
- a
floatvalue if exist, otherwisenull.
-
setSmoothnessTolerance
public PdfExtGState setSmoothnessTolerance(float smoothnessTolerance)
Sets the smoothness tolerance value,SMkey.- Parameters:
smoothnessTolerance- afloatvalue.- Returns:
- object itself.
-
getAutomaticStrokeAdjustmentFlag
public java.lang.Boolean getAutomaticStrokeAdjustmentFlag()
Gets value of an automatic stroke adjustment flag,SAkey.- Returns:
- a
booleanvalue if exist, otherwisenull.
-
setAutomaticStrokeAdjustmentFlag
public PdfExtGState setAutomaticStrokeAdjustmentFlag(boolean strokeAdjustment)
Sets value of an automatic stroke adjustment flag,SAkey.- Parameters:
strokeAdjustment- abooleanvalue.- Returns:
- object itself.
-
getBlendMode
public PdfObject getBlendMode()
Gets the current blend mode for the transparent imaging model,BMkey.
-
setBlendMode
public PdfExtGState setBlendMode(PdfObject blendMode)
Sets the current blend mode for the transparent imaging model,BMkey.
-
getSoftMask
public PdfObject getSoftMask()
Gets the current soft mask,SMaskkey.- Returns:
- a
PdfObject, should be eitherPdfNameorPdfDictionary.
-
setSoftMask
public PdfExtGState setSoftMask(PdfObject sMask)
Sets the current soft mask,SMaskkey.- Parameters:
sMask- aPdfObject, shall be eitherPdfNameorPdfDictionary.- Returns:
- object itself.
-
getStrokeOpacity
public java.lang.Float getStrokeOpacity()
Gets the current alpha constant, specifying the constant shape or constant opacity value for stroking operations in the transparent imaging model,CAkey.- Returns:
- a
floatvalue if exist, otherwisenull.
-
setStrokeOpacity
public PdfExtGState setStrokeOpacity(float strokingAlphaConstant)
Sets the current alpha constant, specifying the constant shape or constant opacity value for stroking operations in the transparent imaging model,CAkey.- Parameters:
strokingAlphaConstant- afloatvalue.- Returns:
- object itself.
-
getFillOpacity
public java.lang.Float getFillOpacity()
Gets the current alpha constant, specifying the constant shape or constant opacity value for non-stroking operations in the transparent imaging model,cakey.- Returns:
- a
floatvalue if exist, otherwisenull.
-
setFillOpacity
public PdfExtGState setFillOpacity(float fillingAlphaConstant)
Sets the current alpha constant, specifying the constant shape or constant opacity value for non-stroking operations in the transparent imaging model,cakey.- Parameters:
fillingAlphaConstant- afloatvalue.- Returns:
- object itself.
-
getAlphaSourceFlag
public java.lang.Boolean getAlphaSourceFlag()
Gets the alpha source flag ("alpha is shape"), specifying whether the current soft mask and alpha constant shall be interpreted as shape values (true) or opacity values (false),AISkey.- Returns:
- a
booleanvalue if exist, otherwisenull.
-
setAlphaSourceFlag
public PdfExtGState setAlphaSourceFlag(boolean alphaSourceFlag)
Sets the alpha source flag ("alpha is shape"), specifying whether the current soft mask and alpha constant shall be interpreted as shape values (true) or opacity values (false),AISkey.- Parameters:
alphaSourceFlag- iftrue- alpha as shape values, iffalse— as opacity values.- Returns:
- object itself.
-
getTextKnockoutFlag
public java.lang.Boolean getTextKnockoutFlag()
Gets the text knockout flag, which determine the behaviour of overlapping glyphs within a text object in the transparent imaging model,TKkey.- Returns:
- a
booleanvalue if exist, otherwisenull.
-
setTextKnockoutFlag
public PdfExtGState setTextKnockoutFlag(boolean textKnockoutFlag)
Sets the text knockout flag, which determine the behaviour of overlapping glyphs within a text object in the transparent imaging model,TKkey.- Parameters:
textKnockoutFlag-trueif enabled.- Returns:
- object itself.
-
setUseBlackPointCompensation
public PdfExtGState setUseBlackPointCompensation(boolean useBlackPointCompensation)
PDF 2.0. This graphics state parameter controls whether black point compensation is performed while doing CIE-based colour conversions.- Parameters:
useBlackPointCompensation-trueto enable,falseto disable- Returns:
- object itself
-
isBlackPointCompensationUsed
public java.lang.Boolean isBlackPointCompensationUsed()
PDF 2.0. Checks whether the black point compensation is performed while doing CIE-based colour conversions.- Returns:
trueif black point compensation is used,falseif it is not used, ornullis the value is set to Default, or not set at all
-
setHalftoneOrigin
public PdfExtGState setHalftoneOrigin(float x, float y)
PDF 2.0. Sets halftone origin- Parameters:
x- X location of the halftone origin in the current coordinate systemy- Y location of the halftone origin in the current coordinate system- Returns:
- this
PdfExtGStateinstance
-
getHalftoneOrigin
public float[] getHalftoneOrigin()
PDF 2.0. Gets halftone origin- Returns:
- an array of two values specifying X and Y values of the halftone origin in the current coordinate system,
respectively, or
nullif halftone origin is not specified
-
put
public PdfExtGState put(PdfName key, PdfObject value)
Puts the value into Graphics state parameter dictionary and associates it with the specified key. If the key is already present, it will override the old value with the specified one.- Parameters:
key- key to insert or to overridevalue- the value to associate with the specified key- Returns:
- object itself.
-
flush
public void flush()
To manually flush aPdfObjectbehind this wrapper, you have to ensure that this object is added to the document, i.e. it has an indirect reference. Basically this means that before flushing you need to explicitly callPdfObjectWrapper.makeIndirect(PdfDocument). For example: wrapperInstance.makeIndirect(document).flush(); Note that not every wrapper require this, only those that have such warning in documentation.- Overrides:
flushin classPdfObjectWrapper<PdfDictionary>
-
isWrappedObjectMustBeIndirect
protected boolean isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the resultant document.
If this method returns true it doesn't necessarily mean that object must be in the indirect state at any moment, but rather defines that when the object will be written to the document it will be transformed into indirect object if it's not indirect yet.
Return value of this method shouldn't depend on any logic, it should return always true or false.- Specified by:
isWrappedObjectMustBeIndirectin classPdfObjectWrapper<PdfDictionary>- Returns:
- true if in the resultant document the object behind the wrapper must be indirect, otherwise false.
-
-