Class PdfWidgetAnnotation


public class PdfWidgetAnnotation extends PdfAnnotation
  • Field Details

  • Constructor Details

  • Method Details

    • getSubtype

      public PdfName getSubtype()
      Description copied from class: PdfAnnotation
      Gets a PdfName which value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.
      Specified by:
      getSubtype in class PdfAnnotation
      Returns:
      subtype of this annotation.
    • setParent

      public PdfWidgetAnnotation setParent (PdfObject parent)
    • setHighlightMode

      public PdfWidgetAnnotation setHighlightMode (PdfName mode)
      Setter for the annotation's highlighting mode. Possible values are
      Parameters:
      mode - The new value for the annotation's highlighting mode.
      Returns:
      The widget annotation which this method was called on.
    • getHighlightMode

      public PdfName getHighlightMode()
      Getter for the annotation's highlighting mode.
      Returns:
      Current value of the annotation's highlighting mode.
    • releaseFormFieldFromWidgetAnnotation

      public void releaseFormFieldFromWidgetAnnotation()
      Remove widget annotation from AcroForm hierarchy.
    • setVisibility

      public PdfWidgetAnnotation setVisibility (int visibility)
      Set the visibility flags of the Widget annotation Options are: HIDDEN, HIDDEN_BUT_PRINTABLE, VISIBLE, VISIBLE_BUT_DOES_NOT_PRINT
      Parameters:
      visibility - visibility option
      Returns:
      the edited widget annotation
    • getAction

      public PdfDictionary getAction()
      An PdfAction to perform, such as launching an application, playing a sound, changing an annotation’s appearance state etc, when the annotation is activated.
      Returns:
      PdfDictionary which defines the characteristics and behaviour of an action.
    • setAction

      public PdfWidgetAnnotation setAction (PdfAction action)
      Sets a PdfAction to this annotation which will be performed when the annotation is activated.
      Parameters:
      action - PdfAction to set to this annotation.
      Returns:
      this PdfWidgetAnnotation instance.
    • getAdditionalAction

      public PdfDictionary getAdditionalAction()
      An additional actions dictionary that extends the set of events that can trigger the execution of an action. See ISO-320001 12.6.3 Trigger Events.
      Returns:
      an additional actions PdfDictionary.
      See Also:
    • setAdditionalAction

      public PdfWidgetAnnotation setAdditionalAction (PdfName key, PdfAction action)
      Sets an additional PdfAction to this annotation which will be performed in response to the specific trigger event defined by key. See ISO-320001 12.6.3, "Trigger Events".
      Parameters:
      key - a PdfName that denotes a type of the additional action to set.
      action - PdfAction to set as additional to this annotation.
      Returns:
      this PdfWidgetAnnotation instance.
    • getAppearanceCharacteristics

      public PdfDictionary getAppearanceCharacteristics()
      An appearance characteristics dictionary containing additional information for constructing the annotation’s appearance stream. See ISO-320001, Table 189.
      Returns:
      an appearance characteristics dictionary or null if it isn't specified.
    • setAppearanceCharacteristics

      public PdfWidgetAnnotation setAppearanceCharacteristics (PdfDictionary characteristics)
      Sets an appearance characteristics dictionary containing additional information for constructing the annotation’s appearance stream. See ISO-320001, Table 189.
      Parameters:
      characteristics - the PdfDictionary with additional information for appearance stream.
      Returns:
      this PdfWidgetAnnotation instance.
    • getBorderStyle

      public PdfDictionary getBorderStyle()
      The dictionaries for some annotation types (such as free text and polygon annotations) can include the BS entry. That entry specifies a border style dictionary that has more settings than the array specified for the Border entry (see PdfAnnotation.getBorder()). If an annotation dictionary includes the BS entry, then the Border entry is ignored. If annotation includes AP (see PdfAnnotation.getAppearanceDictionary()) it takes precedence over the BS entry. For more info on BS entry see ISO-320001, Table 166.
      Returns:
      PdfDictionary which is a border style dictionary or null if it is not specified.
    • setBorderStyle

      public PdfWidgetAnnotation setBorderStyle (PdfDictionary borderStyle)
      Sets border style dictionary that has more settings than the array specified for the Border entry (PdfAnnotation.getBorder()). See ISO-320001, Table 166 and getBorderStyle() for more info.
      Parameters:
      borderStyle - a border style dictionary specifying the line width and dash pattern that shall be used in drawing the annotation’s border.
      Returns:
      this PdfWidgetAnnotation instance.
    • setBorderStyle

      public PdfWidgetAnnotation setBorderStyle (PdfName style)
      Setter for the annotation's preset border style. Possible values are See also ISO-320001, Table 166.
      Parameters:
      style - The new value for the annotation's border style.
      Returns:
      this PdfWidgetAnnotation instance.
      See Also:
    • setDashPattern

      public PdfWidgetAnnotation setDashPattern (PdfArray dashPattern)
      Setter for the annotation's preset dashed border style. This property has affect only if PdfAnnotation.STYLE_DASHED style was used for the annotation border style (see setBorderStyle(PdfName). See ISO-320001 8.4.3.6, "Line Dash Pattern" for the format in which dash pattern shall be specified.
      Parameters:
      dashPattern - a dash array defining a pattern of dashes and gaps that shall be used in drawing a dashed border.
      Returns:
      this PdfWidgetAnnotation instance.