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 PdfName
BM_COLOR
Standard nonseparable blend mode.static PdfName
BM_COLOR_BURN
Standard separable blend mode.static PdfName
BM_COLOR_DODGE
Standard separable blend mode.static PdfName
BM_DARKEN
Standard separable blend mode.static PdfName
BM_DIFFERENCE
Standard separable blend mode.static PdfName
BM_EXCLUSION
Standard separable blend mode.static PdfName
BM_HARD_LIGHT
Standard separable blend mode.static PdfName
BM_HUE
Standard nonseparable blend mode.static PdfName
BM_LIGHTEN
Standard separable blend mode.static PdfName
BM_LUMINOSITY
Standard nonseparable blend mode.static PdfName
BM_MULTIPLY
Standard separable blend mode.static PdfName
BM_NORMAL
Standard separable blend mode.static PdfName
BM_OVERLAY
Standard separable blend mode.static PdfName
BM_SATURATION
Standard nonseparable blend mode.static PdfName
BM_SCREEN
Standard separable blend mode.static PdfName
BM_SOFT_LIGHT
Standard 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 existedPdfDictionary
object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flush()
To manually flush aPdfObject
behind this wrapper, you have to ensure that this object is added to the document, i.e.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
),AIS
key.java.lang.Boolean
getAutomaticStrokeAdjustmentFlag()
Gets value of an automatic stroke adjustment flag,SA
key.PdfObject
getBlackGenerationFunction()
Gets the black-generation function value,BG
.PdfObject
getBlackGenerationFunction2()
Gets the black-generation function value orDefault
,BG2
key.PdfObject
getBlendMode()
Gets the current blend mode for the transparent imaging model,BM
key.PdfArray
getDashPattern()
Gets line dash pattern value,D
key.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,ca
key.java.lang.Boolean
getFillOverprintFlag()
Get overprint flag value for non-stroking operations,op
key.java.lang.Float
getFlatnessTolerance()
Gets the flatness tolerance value,FL
key.PdfArray
getFont()
Gets font and size,Font
key.PdfObject
getHalftone()
Gets the halftone dictionary, stream orDefault
,HT
key.float[]
getHalftoneOrigin()
PDF 2.0.java.lang.Integer
getLineCapStyle()
Gets line gap style value,LC
key.java.lang.Integer
getLineJoinStyle()
Gets line join style value,LJ
key.java.lang.Float
getLineWidth()
Gets line width value,LW
key.java.lang.Float
getMiterLimit()
Gets miter limit value,ML key
.java.lang.Integer
getOverprintMode()
Get overprint control mode,OPM
key.PdfName
getRenderingIntent()
Gets rendering intent value,RI
key.java.lang.Float
getSmothnessTolerance()
Gets the smoothness tolerance value,SM
key.PdfObject
getSoftMask()
Gets the current soft mask,SMask
key.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,CA
key.java.lang.Boolean
getStrokeOverprintFlag()
Get overprint flag value for stroking operations,OP
key.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,TK
key.PdfObject
getTransferFunction()
Gets the transfer function value,TR
key.PdfObject
getTransferFunction2()
Gets the transfer function value orDefault
,TR2
key.PdfObject
getUndercolorRemovalFunction()
Gets the undercolor-removal function,UCR
key.PdfObject
getUndercolorRemovalFunction2()
Gets the undercolor-removal function value orDefault
,UCR2
key.java.lang.Boolean
isBlackPointCompensationUsed()
PDF 2.0.protected boolean
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the resultant document.PdfExtGState
put(PdfName key, PdfObject value)
Puts the value into Graphics state parameter dictionary and associates it with the specified key.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
),AIS
key.PdfExtGState
setAutomaticStrokeAdjustmentFlag(boolean strokeAdjustment)
Sets value of an automatic stroke adjustment flag,SA
key.PdfExtGState
setBlackGenerationFunction(PdfObject blackGenerationFunction)
Sets the black-generation function value,BG
.PdfExtGState
setBlackGenerationFunction2(PdfObject blackGenerationFunction2)
Sets the black-generation function value orDefault
,BG2
key.PdfExtGState
setBlendMode(PdfObject blendMode)
Sets the current blend mode for the transparent imaging model,BM
key.PdfExtGState
setDashPattern(PdfArray dashPattern)
Sets line dash pattern value,D
key.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,ca
key.PdfExtGState
setFillOverPrintFlag(boolean fillOverprintFlag)
Set overprint flag value for non-stroking operations,op
key.PdfExtGState
setFlatnessTolerance(float flatnessTolerance)
Sets the flatness tolerance value,FL
key.PdfExtGState
setFont(PdfArray font)
Sets font and size,Font
key.PdfExtGState
setHalftone(PdfObject halftone)
Sets the halftone orDefault
,HT
key.PdfExtGState
setHalftoneOrigin(float x, float y)
PDF 2.0.PdfExtGState
setLineCapStyle(int lineCapStyle)
Sets line gap style value,LC
key.PdfExtGState
setLineJoinStyle(int lineJoinStyle)
Sets line join style value,LJ
key.PdfExtGState
setLineWidth(float lineWidth)
Sets line width value,LW
key.PdfExtGState
setMiterLimit(float miterLimit)
Sets miter limit value,ML key
.PdfExtGState
setOverprintMode(int overprintMode)
Set overprint control mode,OPM
key.PdfExtGState
setRenderingIntent(PdfName renderingIntent)
Sets rendering intent value,RI
key.PdfExtGState
setSmoothnessTolerance(float smoothnessTolerance)
Sets the smoothness tolerance value,SM
key.PdfExtGState
setSoftMask(PdfObject sMask)
Sets the current soft mask,SMask
key.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,CA
key.PdfExtGState
setStrokeOverPrintFlag(boolean strokeOverPrintFlag)
Set overprint flag value for stroking operations,OP
key.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,TK
key.PdfExtGState
setTransferFunction(PdfObject transferFunction)
Sets the transfer function value,TR
key.PdfExtGState
setTransferFunction2(PdfObject transferFunction2)
Sets the transfer function value orDefault
,TR2
key.PdfExtGState
setUndercolorRemovalFunction(PdfObject undercolorRemovalFunction)
Sets the undercolor-removal function,UCR
key.PdfExtGState
setUndercolorRemovalFunction2(PdfObject undercolorRemovalFunction2)
Sets the undercolor-removal function value orDefault
,UCR2
key.PdfExtGState
setUseBlackPointCompensation(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 PdfName BM_NORMAL
Standard separable blend mode. See ISO-320001, table 136
-
BM_MULTIPLY
public static PdfName BM_MULTIPLY
Standard separable blend mode. See ISO-320001, table 136
-
BM_SCREEN
public static PdfName BM_SCREEN
Standard separable blend mode. See ISO-320001, table 136
-
BM_OVERLAY
public static PdfName BM_OVERLAY
Standard separable blend mode. See ISO-320001, table 136
-
BM_DARKEN
public static PdfName BM_DARKEN
Standard separable blend mode. See ISO-320001, table 136
-
BM_LIGHTEN
public static PdfName BM_LIGHTEN
Standard separable blend mode. See ISO-320001, table 136
-
BM_COLOR_DODGE
public static PdfName BM_COLOR_DODGE
Standard separable blend mode. See ISO-320001, table 136
-
BM_COLOR_BURN
public static PdfName BM_COLOR_BURN
Standard separable blend mode. See ISO-320001, table 136
-
BM_HARD_LIGHT
public static PdfName BM_HARD_LIGHT
Standard separable blend mode. See ISO-320001, table 136
-
BM_SOFT_LIGHT
public static PdfName BM_SOFT_LIGHT
Standard separable blend mode. See ISO-320001, table 136
-
BM_DIFFERENCE
public static PdfName BM_DIFFERENCE
Standard separable blend mode. See ISO-320001, table 136
-
BM_EXCLUSION
public static PdfName BM_EXCLUSION
Standard separable blend mode. See ISO-320001, table 136
-
BM_HUE
public static PdfName BM_HUE
Standard nonseparable blend mode. See ISO-320001, table 137
-
BM_SATURATION
public static PdfName BM_SATURATION
Standard nonseparable blend mode. See ISO-320001, table 137
-
BM_COLOR
public static PdfName BM_COLOR
Standard nonseparable blend mode. See ISO-320001, table 137
-
BM_LUMINOSITY
public static 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 existedPdfDictionary
object- 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,LW
key.- Returns:
- a
float
value if exist, otherwisenull
.
-
setLineWidth
public PdfExtGState setLineWidth(float lineWidth)
Sets line width value,LW
key.- Parameters:
lineWidth
- afloat
value.- Returns:
- object itself.
-
getLineCapStyle
public java.lang.Integer getLineCapStyle()
Gets line gap style value,LC
key.- Returns:
- 0 - butt cap, 1 - round cap, 2 - projecting square cap.
-
setLineCapStyle
public PdfExtGState setLineCapStyle(int lineCapStyle)
Sets line gap style value,LC
key.- 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,LJ
key.- 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,LJ
key.- 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
float
value if exist, otherwisenull
.
-
setMiterLimit
public PdfExtGState setMiterLimit(float miterLimit)
Sets miter limit value,ML key
. See also line join style.- Parameters:
miterLimit
- afloat
value.- Returns:
- object itself.
-
getDashPattern
public PdfArray getDashPattern()
Gets line dash pattern value,D
key.- Returns:
- a
PdfArray
, that represents line dash pattern.
-
setDashPattern
public PdfExtGState setDashPattern(PdfArray dashPattern)
Sets line dash pattern value,D
key.- Parameters:
dashPattern
- aPdfArray
, that represents line dash pattern.- Returns:
- object itself.
-
getRenderingIntent
public PdfName getRenderingIntent()
Gets rendering intent value,RI
key. Valid values are:AbsoluteColorimetric
,RelativeColorimetric
,Saturation
,Perceptual
.- Returns:
- a
PdfName
instance.
-
setRenderingIntent
public PdfExtGState setRenderingIntent(PdfName renderingIntent)
Sets rendering intent value,RI
key.- Parameters:
renderingIntent
- aPdfName
instance, Valid values are:AbsoluteColorimetric
,RelativeColorimetric
,Saturation
,Perceptual
.- Returns:
- object itself.
-
getStrokeOverprintFlag
public java.lang.Boolean getStrokeOverprintFlag()
Get overprint flag value for stroking operations,OP
key.- Returns:
- a
boolean
value if exist, otherwisenull
.
-
setStrokeOverPrintFlag
public PdfExtGState setStrokeOverPrintFlag(boolean strokeOverPrintFlag)
Set overprint flag value for stroking operations,OP
key.- 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,op
key.- Returns:
- a
boolean
value if exist, otherwisenull
.
-
setFillOverPrintFlag
public PdfExtGState setFillOverPrintFlag(boolean fillOverprintFlag)
Set overprint flag value for non-stroking operations,op
key.- Parameters:
fillOverprintFlag
-true
, for applying overprint for non-stroking operations.- Returns:
- object itself.
-
getOverprintMode
public java.lang.Integer getOverprintMode()
Get overprint control mode,OPM
key.- Returns:
- an
int
value if exist, otherwisenull
.
-
setOverprintMode
public PdfExtGState setOverprintMode(int overprintMode)
Set overprint control mode,OPM
key.- Parameters:
overprintMode
- anint
value, see ISO-320001, 8.6.7 Overprint Control.- Returns:
- object itself.
-
getFont
public PdfArray getFont()
Gets font and size,Font
key.- Returns:
- a
PdfArray
of the form[font size]
, wherefont
shall be an indirect reference to a font dictionary andsize
shall be a number expressed in text space units.
-
setFont
public PdfExtGState setFont(PdfArray font)
Sets font and size,Font
key. 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
- aPdfArray
of the form[font size]
, wherefont
shall be an indirect reference to a font dictionary andsize
shall 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 (seeIPdfFunction
object 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 (seeIPdfFunction
object wrapper for convenience API in reading/manipulating such function objects).- Returns:
- object itself.
-
getBlackGenerationFunction2
public PdfObject getBlackGenerationFunction2()
Gets the black-generation function value orDefault
,BG2
key.- Returns:
- the returned value is
PdfObject
value, which is either aPdfName
of a predefined value or an object representing custom function (seeIPdfFunction
object wrapper for convenience API in reading/manipulating such function objects).
-
setBlackGenerationFunction2
public PdfExtGState setBlackGenerationFunction2(PdfObject blackGenerationFunction2)
Sets the black-generation function value orDefault
,BG2
key. Note, if bothBG
andBG2
are present in the same graphics state parameter dictionary,BG2
takes precedence.- Parameters:
blackGenerationFunction2
- aPdfObject
value, shall be an object representing custom function (seeIPdfFunction
object wrapper for convenience API in reading/manipulating such function objects) orDefault
.- Returns:
- object itself.
-
getUndercolorRemovalFunction
public PdfObject getUndercolorRemovalFunction()
Gets the undercolor-removal function,UCR
key.- Returns:
- a
PdfObject
, should be an object representing custom function (seeIPdfFunction
object wrapper for convenience API in reading/manipulating such function objects).
-
setUndercolorRemovalFunction
public PdfExtGState setUndercolorRemovalFunction(PdfObject undercolorRemovalFunction)
Sets the undercolor-removal function,UCR
key.- Parameters:
undercolorRemovalFunction
- aPdfObject
, shall be an object representing custom function (seeIPdfFunction
object wrapper for convenience API in reading/manipulating such function objects).- Returns:
- object itself.
-
getUndercolorRemovalFunction2
public PdfObject getUndercolorRemovalFunction2()
Gets the undercolor-removal function value orDefault
,UCR2
key.- Returns:
- the returned value is
PdfObject
value, which is either aPdfName
of a predefined value or an object representing custom function (seeIPdfFunction
object wrapper for convenience API in reading/manipulating such function objects).
-
setUndercolorRemovalFunction2
public PdfExtGState setUndercolorRemovalFunction2(PdfObject undercolorRemovalFunction2)
Sets the undercolor-removal function value orDefault
,UCR2
key. Note, if bothUCR
andUCR2
are present in the same graphics state parameter dictionary,UCR2
takes precedence.- Parameters:
undercolorRemovalFunction2
- aPdfObject
value, shall be an object representing custom function (seeIPdfFunction
object wrapper for convenience API in reading/manipulating such function objects) orDefault
.- Returns:
- object itself.
-
getTransferFunction
public PdfObject getTransferFunction()
Gets the transfer function value,TR
key.- Returns:
- the returned value is
PdfObject
value, which is either aPdfName
orPdfArray
of a predefined value or an object representing custom function (seeIPdfFunction
object wrapper for convenience API in reading/manipulating such function objects).
-
setTransferFunction
public PdfExtGState setTransferFunction(PdfObject transferFunction)
Sets the transfer function value,TR
key.- Parameters:
transferFunction
- aPdfObject
, shall be either aPdfName
orPdfArray
of a predefined value or an object representing custom function (seeIPdfFunction
object wrapper for convenience API in reading/manipulating such function objects).- Returns:
- object itself.
-
getTransferFunction2
public PdfObject getTransferFunction2()
Gets the transfer function value orDefault
,TR2
key.- Returns:
- the returned value is
PdfObject
value, which is either aPdfName
orPdfArray
of a predefined value or an object representing custom function (seeIPdfFunction
object wrapper for convenience API in reading/manipulating such function objects).
-
setTransferFunction2
public PdfExtGState setTransferFunction2(PdfObject transferFunction2)
Sets the transfer function value orDefault
,TR2
key. Note, if bothTR
andTR2
are present in the same graphics state parameter dictionary,TR2
takes precedence.- Parameters:
transferFunction2
- aPdfObject
, shall be either aPdfName
orPdfArray
of a predefined value or an object representing custom function (seeIPdfFunction
object wrapper for convenience API in reading/manipulating such function objects).- Returns:
- object itself.
-
getHalftone
public PdfObject getHalftone()
Gets the halftone dictionary, stream orDefault
,HT
key.- Returns:
- a
PdfObject
, should be eitherPdfDictionary
,PdfStream
orPdfName
.
-
setHalftone
public PdfExtGState setHalftone(PdfObject halftone)
Sets the halftone orDefault
,HT
key.- Parameters:
halftone
- aPdfObject
, shall be eitherPdfDictionary
,PdfStream
orPdfName
.- Returns:
- object itself.
-
getFlatnessTolerance
public java.lang.Float getFlatnessTolerance()
Gets the flatness tolerance value,FL
key.- Returns:
- a
float
value if exist, otherwisenull
.
-
setFlatnessTolerance
public PdfExtGState setFlatnessTolerance(float flatnessTolerance)
Sets the flatness tolerance value,FL
key.- Parameters:
flatnessTolerance
- afloat
value.- Returns:
- object itself.
-
getSmothnessTolerance
public java.lang.Float getSmothnessTolerance()
Gets the smoothness tolerance value,SM
key.- Returns:
- a
float
value if exist, otherwisenull
.
-
setSmoothnessTolerance
public PdfExtGState setSmoothnessTolerance(float smoothnessTolerance)
Sets the smoothness tolerance value,SM
key.- Parameters:
smoothnessTolerance
- afloat
value.- Returns:
- object itself.
-
getAutomaticStrokeAdjustmentFlag
public java.lang.Boolean getAutomaticStrokeAdjustmentFlag()
Gets value of an automatic stroke adjustment flag,SA
key.- Returns:
- a
boolean
value if exist, otherwisenull
.
-
setAutomaticStrokeAdjustmentFlag
public PdfExtGState setAutomaticStrokeAdjustmentFlag(boolean strokeAdjustment)
Sets value of an automatic stroke adjustment flag,SA
key.- Parameters:
strokeAdjustment
- aboolean
value.- Returns:
- object itself.
-
getBlendMode
public PdfObject getBlendMode()
Gets the current blend mode for the transparent imaging model,BM
key.
-
setBlendMode
public PdfExtGState setBlendMode(PdfObject blendMode)
Sets the current blend mode for the transparent imaging model,BM
key.
-
getSoftMask
public PdfObject getSoftMask()
Gets the current soft mask,SMask
key.- Returns:
- a
PdfObject
, should be eitherPdfName
orPdfDictionary
.
-
setSoftMask
public PdfExtGState setSoftMask(PdfObject sMask)
Sets the current soft mask,SMask
key.- Parameters:
sMask
- aPdfObject
, shall be eitherPdfName
orPdfDictionary
.- 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,CA
key.- Returns:
- a
float
value 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,CA
key.- Parameters:
strokingAlphaConstant
- afloat
value.- 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,ca
key.- Returns:
- a
float
value 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,ca
key.- Parameters:
fillingAlphaConstant
- afloat
value.- 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
),AIS
key.- Returns:
- a
boolean
value 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
),AIS
key.- 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,TK
key.- Returns:
- a
boolean
value 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,TK
key.- Parameters:
textKnockoutFlag
-true
if 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
-true
to enable,false
to 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:
true
if black point compensation is used,false
if it is not used, ornull
is 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
PdfExtGState
instance
-
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
null
if 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 aPdfObject
behind 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:
flush
in 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:
isWrappedObjectMustBeIndirect
in classPdfObjectWrapper<PdfDictionary>
- Returns:
- true if in the resultant document the object behind the wrapper must be indirect, otherwise false.
-
-