Class ExtendedGraphicState

java.lang.Object
com.datalogics.PDFL.ExtendedGraphicState

public class ExtendedGraphicState extends Object
The extended graphic state, to supplement original graphic state. The Graphics State is an internal data structure in a PDF file that holds the parameters that describe graphics within that file. These parameters define how individual graphics are presented on the page, including layers and transparencies.

The Extended Graphic State was introduced to expand the original Graphics State data structure, providing space to define and store more data objects within a PDF.

  • Constructor Details

    • ExtendedGraphicState

      public ExtendedGraphicState()
      Create a new default ExtendedGraphicState for the document in which this ExtendedGraphicState will be used.
  • Method Details

    • delete

      public void delete()
    • setApplyOverprintForStroking

      public void setApplyOverprintForStroking(boolean applyOverprintForStroking)
      Specifies if overprint is enabled for stroke operations.
      Parameters:
      applyOverprintForStroking - whether to enable overprint for stroke operations.
    • getApplyOverprintForStroking

      public boolean getApplyOverprintForStroking()
      Specifies if overprint is enabled for stroke operations.
      Returns:
      applyOverprintForStroking
    • setApplyOverprintForOtherThanStroking

      public void setApplyOverprintForOtherThanStroking(boolean applyOverprintForOtherThanStroking)
      Specifies if overprint is enabled for operations other than stroking.
      Parameters:
      applyOverprintForOtherThanStroking - whether to enable overprint for stroke operations.
    • getApplyOverprintForOtherThanStroking

      public boolean getApplyOverprintForOtherThanStroking()
      Specifies if overprint is enabled for operations other than stroking.
      Returns:
      applyOverprintForOtherThanStroking
    • setOverprintMode

      public void setOverprintMode(OverprintMode overprintMode)
      Specifies the overprint mode - specifying whether a color component value of 0 in a DeviceCMYK color space should erase that component or leave it unchanged when overprinting.
      Parameters:
      overprintMode - the mode setting.
    • getOverprintMode

      public OverprintMode getOverprintMode()
      Specifies the overprint mode - specifying whether a color component value of 0 in a DeviceCMYK color space should erase that component or leave it unchanged when overprinting.
      Returns:
      overprintMode - the mode setting.
    • setApplyAutoStroke

      public void setApplyAutoStroke(boolean applyAutoStrokeAdjustment)
      Specifies whether stroke adjustment is enabled in the graphics state.
      Parameters:
      applyAutoStrokeAdjustment - whether it is enabled, true or false.
    • getApplyAutoStroke

      public boolean getApplyAutoStroke()
      Returns whether stroke adjustment is enabled in the graphics state.
      Returns:
      applyAutoStrokeAdjustment - whether it is enabled, true or false.
    • setBlendMode

      public void setBlendMode(BlendMode blendMode)
      Sets the blend mode for the color composites for each object painted.
      Parameters:
      blendMode - the blend mode used in object painting.
    • getBlendMode

      public BlendMode getBlendMode()
      Returns the blend mode for the color composite for each object painted.
      Returns:
      blendMode - the blend mode used in object painting.
    • setOpacityForStroking

      public void setOpacityForStroking(double opacity)
      Sets the opacity value for stroke operations.
      Parameters:
      opacity - the opacity level, from 0.0 to 1.0, inclusive.
    • getOpacityForStroking

      public double getOpacityForStroking()
      Gets the opacity value for stroke operations.
      Returns:
      opacity, a value between 0.0 and 1.0.
    • setOpacityForOtherThanStroking

      public void setOpacityForOtherThanStroking(double opacity)
      Sets the opacity value for other-than-stroke operations.
      Parameters:
      opacity - the opacity level, from 0.0 to 1.0, inclusive.
    • getOpacityForOtherThanStroking

      public double getOpacityForOtherThanStroking()
      Gets the opacity value for other-than-stroke operations.
      Returns:
      opacity, a value between 0.0 and 1.0.
    • setAlphaIsShape

      public void setAlphaIsShape(boolean alphaIsShape)
      Specifies if the alpha is to be interpreted as a shape or opacity mask.
      Parameters:
      alphaIsShape - if set true, interpret sources of alpha as shape, else interpret as opacity mask.
    • getAlphaIsShape

      public boolean getAlphaIsShape()
      Returns if the alpha is to be interpreted as a shape or opacity mask.
      Returns:
      alphaIsShape - if set true, interpret sources of alpha as shape, else interpret as opacity mask.
    • setTextKnockout

      public void setTextKnockout(boolean enabled)
      Specifies whether text knockout is enabled in the graphics state.
      Parameters:
      enabled - if set true, text knockout will be enabled.
    • getTextKnockout

      public boolean getTextKnockout()
      Returns whether text knockout is enabled in the graphics state.
      Returns:
      enabled - if true, text knockout is enabled.
    • setSmoothnessTolerance

      public void setSmoothnessTolerance(double tolerance)
      Sets the smoothness tolerance, the quality of smooth shading.
      Parameters:
      tolerance - the smoothness tolerance, from 0.0 to 1.0, inclusive.
    • getSmoothnessTolerance

      public double getSmoothnessTolerance()
      Gets the smoothness tolerance, the quality of smooth shading.
      Returns:
      tolerance, a value between 0.0 and 1.0.
    • setBlackGeneration

      public void setBlackGeneration(Function function)
      Sets the black generation function.
      Parameters:
      function - the black generation function.
    • getBlackGeneration

      public Function getBlackGeneration()
      Gets the black generation function.
      Returns:
      function - the black generation function.
    • setUndercolorRemoval

      public void setUndercolorRemoval(Function function)
      Sets the undercolor removal function.
      Parameters:
      function - the undercolor removal function.
    • getUndercolorRemoval

      public Function getUndercolorRemoval()
      Gets the undercolor removal function.
      Returns:
      function - the undercolor removal function.
    • setTransferFunction

      public void setTransferFunction(List<Function> function)
      Sets the transfer function.
      Parameters:
      function - the transfer function.
    • getTransferFunction

      public List<Function> getTransferFunction()
      Gets the transfer function.
      Returns:
      function - the transfer function.
    • getPDFDict

      public PDFDict getPDFDict()
      Get the dictionary associated with the extended graphic state.

      Returns:
      The dictionary associated with the extended graphic state.