Class PdfMarkupAnnotation

Direct Known Subclasses:
PdfCaretAnnotation, PdfCircleAnnotation, PdfFileAttachmentAnnotation, PdfFreeTextAnnotation, PdfInkAnnotation, PdfLineAnnotation, PdfPolyGeomAnnotation, PdfRedactAnnotation, PdfSoundAnnotation, PdfSquareAnnotation, PdfStampAnnotation, PdfTextAnnotation, PdfTextMarkupAnnotation

public abstract class PdfMarkupAnnotation extends PdfAnnotation
This is a super class for the annotations which are defined as markup annotations because they are used primarily to mark up PDF documents. These annotations have text that appears as part of the annotation and may be displayed in other ways by a conforming reader, such as in a Comments pane. See also ISO-320001 12.5.6.2 "Markup Annotations".
  • Field Details

  • Constructor Details

  • Method Details

    • getText

      public PdfString getText()
      The text label that will be displayed in the title bar of the annotation's pop-up window when open and active. This entry shall identify the user who added the annotation.
      Returns:
      PdfString which value is an annotation text label content or null if text is not specified.
    • setText

      public PdfMarkupAnnotation setText (PdfString text)
      Sets the text label that will be displayed in the title bar of the annotation's pop-up window when open and active. This entry shall identify the user who added the annotation.
      Parameters:
      text - PdfString which value is an annotation text label content.
      Returns:
      this PdfMarkupAnnotation instance.
    • getOpacity

      public PdfNumber getOpacity()
      The constant opacity value that will be used in painting the annotation. This value is applied to all visible elements of the annotation in its closed state (including its background and border) but not to the pop-up window that appears when the annotation is opened. Default value: 1.0.
      Returns:
      a PdfNumber which value is in range between 0 and 1, which specifies the level of opacity. This method returns null if opacity is not specified; in this case default value is used, which is 1.
    • setOpacity

      public PdfMarkupAnnotation setOpacity (PdfNumber ca)
      Sets the constant opacity value that will be used in painting the annotation.
      Parameters:
      ca - a PdfNumber which value is in range between 0 and 1, which specifies the level of opacity.
      Returns:
      this PdfMarkupAnnotation instance.
      See Also:
    • getRichText

      public PdfObject getRichText()
      A rich text string (see ISO-320001 12.7.3.4, "Rich Text Strings") that shall be displayed in the pop-up window when the annotation is opened.
      Returns:
      text string or text stream that specifies rich text or null if rich text is not specified.
    • setRichText

      public PdfMarkupAnnotation setRichText (PdfObject richText)
      Sets a rich text string (see ISO-320001 12.7.3.4, "Rich Text Strings") that shall be displayed in the pop-up window when the annotation is opened.
      Parameters:
      richText - text string or text stream that specifies rich text.
      Returns:
      this PdfMarkupAnnotation instance.
    • getCreationDate

      public PdfString getCreationDate()
      The date and time when the annotation was created.
      Returns:
      a PdfString which value should be in the date format specified in (ISO-320001 7.9.4, "Dates").
    • setCreationDate

      public PdfMarkupAnnotation setCreationDate (PdfString creationDate)
      Sets the date and time when the annotation was created.
      Parameters:
      creationDate - PdfString which value should be in the date format specified in (ISO-320001 7.9.4, "Dates").
      Returns:
      this PdfMarkupAnnotation instance.
    • getInReplyToObject

      public PdfDictionary getInReplyToObject()
      An annotation object that this annotation is "in reply to." Both annotations shall be on the same page of the document. The relationship between the two annotations shall be specified by the RT entry (see getReplyType()).
      Returns:
      a PdfDictionary that represents an annotation that this annotation is "in reply to."
    • getInReplyTo

      public PdfAnnotation getInReplyTo()
      An annotation that this annotation is "in reply to." Both annotations shall be on the same page of the document. The relationship between the two annotations shall be specified by the RT entry (see getReplyType()).
      Returns:
      a PdfAnnotation that this annotation is "in reply to."
    • setInReplyTo

      public PdfMarkupAnnotation setInReplyTo (PdfAnnotation inReplyTo)
      Sets an annotation that this annotation is "in reply to." Both annotations shall be on the same page of the document. The relationship between the two annotations shall be specified by the RT entry (see getReplyType()).
      Parameters:
      inReplyTo - a PdfAnnotation that this annotation is "in reply to."
      Returns:
      this PdfMarkupAnnotation instance.
    • setPopup

      public PdfMarkupAnnotation setPopup (PdfPopupAnnotation popup)
      Sets a pop-up annotation for entering or editing the text associated with this annotation. Pop-up annotation defines an associated with this annotation pop-up window that may contain text. The Contents (see PdfAnnotation.setContents(PdfString)) entry of the annotation that has an associated popup specifies the text that shall be displayed when the pop-up window is opened.
      Parameters:
      popup - an PdfPopupAnnotation that will be associated with this annotation.
      Returns:
      this PdfMarkupAnnotation instance.
    • getPopupObject

      public PdfDictionary getPopupObject()
      An associated pop-up annotation object. See getPopup() for more info.
      Returns:
      a PdfDictionary that represents an associated pop-up annotation, or null if popup annotation is not specified.
    • getPopup

      public PdfPopupAnnotation getPopup()
      An associated pop-up annotation for entering or editing the text associated with this annotation. Pop-up annotation defines an associated with this annotation pop-up window that may contain text. The Contents (see PdfAnnotation.getContents()) entry of the annotation that has an associated popup specifies the text that shall be displayed when the pop-up window is opened.
      Returns:
      an PdfPopupAnnotation that is associated with this annotation, or null if there is none.
    • getSubject

      public PdfString getSubject()
      Text representing a short description of the subject being addressed by the annotation.
      Returns:
      a PdfString which value is a annotation subject.
    • setSubject

      public PdfMarkupAnnotation setSubject (PdfString subject)
      Sets the text representing a short description of the subject being addressed by the annotation.
      Parameters:
      subject - a PdfString which value is a annotation subject.
      Returns:
      this PdfMarkupAnnotation instance.
    • getReplyType

      public PdfName getReplyType()
      A name specifying the relationship (the "reply type") between this annotation and one specified by IRT entry (see getInReplyTo()). Valid values are:
      • PdfName.R - The annotation shall be considered a reply to the annotation specified by IRT. Conforming readers shall not display replies to an annotation individually but together in the form of threaded comments.
      • PdfName.Group - The annotation shall be grouped with the annotation specified by IRT.
      Returns:
      a PdfName specifying relationship with the specified by the IRT entry; or null if reply type is not specified, in this case the default value is PdfName.R.
    • setReplyType

      public PdfMarkupAnnotation setReplyType (PdfName replyType)
      Sets the relationship (the "reply type") between this annotation and one specified by IRT entry (see setInReplyTo(PdfAnnotation)). For valid values see getInReplyTo().
      Parameters:
      replyType - a PdfName specifying relationship with the specified by the IRT entry.
      Returns:
      this PdfMarkupAnnotation instance.
    • getIntent

      public PdfName getIntent()
      A name describing the intent of the markup annotation. See setIntent(PdfName) for more info.
      Returns:
      a PdfName describing the intent of the markup annotation, or null if not specified.
    • setIntent

      public PdfMarkupAnnotation setIntent (PdfName intent)
      Sets a name describing the intent of the markup annotation. Intents allow conforming readers to distinguish between different uses and behaviors of a single markup annotation type. If this entry is not present or its value is the same as the annotation type, the annotation shall have no explicit intent and should behave in a generic manner in a conforming reader.

      See ISO-320001, free text annotations (Table 174), line annotations (Table 175), polygon annotations (Table 178), and polyline annotations (Table 178) for the specific intent values for those types.

      Parameters:
      intent - a PdfName describing the intent of the markup annotation.
      Returns:
      this PdfMarkupAnnotation instance.
    • getExternalData

      public PdfDictionary getExternalData()
      An external data dictionary specifying data that shall be associated with the annotation. This dictionary contains the following entries:
      Returns:
      An external data PdfDictionary, or null if not specified.
    • setExternalData

      public PdfMarkupAnnotation setExternalData (PdfDictionary exData)
      Sets an external data dictionary specifying data that shall be associated with the annotation. This dictionary should contain the following entries:
      Parameters:
      exData - the external data dictionary
      Returns:
      this PdfMarkupAnnotation instance