Class PDAnnotationTextMarkup

  • All Implemented Interfaces:
    COSObjectable

    public class PDAnnotationTextMarkup
    extends PDAnnotationMarkup
    This is the abstract class that represents a text markup annotation Introduced in PDF 1.3 specification, except Squiggly lines in 1.4.
    • Field Detail

      • SUB_TYPE_HIGHLIGHT

        public static final java.lang.String SUB_TYPE_HIGHLIGHT
        The types of annotation.
        See Also:
        Constant Field Values
      • SUB_TYPE_UNDERLINE

        public static final java.lang.String SUB_TYPE_UNDERLINE
        The types of annotation.
        See Also:
        Constant Field Values
      • SUB_TYPE_SQUIGGLY

        public static final java.lang.String SUB_TYPE_SQUIGGLY
        The types of annotation.
        See Also:
        Constant Field Values
      • SUB_TYPE_STRIKEOUT

        public static final java.lang.String SUB_TYPE_STRIKEOUT
        The types of annotation.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PDAnnotationTextMarkup

        private PDAnnotationTextMarkup()
      • PDAnnotationTextMarkup

        public PDAnnotationTextMarkup​(java.lang.String subType)
        Creates a TextMarkup annotation of the specified sub type.
        Parameters:
        subType - the subtype the annotation represents
      • PDAnnotationTextMarkup

        public PDAnnotationTextMarkup​(COSDictionary field)
        Creates a TextMarkup annotation from a COSDictionary, expected to be a correct object definition.
        Parameters:
        field - the PDF object to represent as a field.
    • Method Detail

      • setQuadPoints

        public void setQuadPoints​(float[] quadPoints)
        This will set the set of quadpoints which encompass the areas of this annotation.
        Parameters:
        quadPoints - an array representing the set of area covered
      • getQuadPoints

        public float[] getQuadPoints()
        This will retrieve the set of quadpoints which encompass the areas of this annotation.
        Returns:
        An array of floats representing the quad points.
      • setSubtype

        public void setSubtype​(java.lang.String subType)
        This will set the sub type (and hence appearance, AP taking precedence) For this annotation. See the SUB_TYPE_XXX constants for valid values.
        Parameters:
        subType - The subtype of the annotation
      • getSubtype

        public java.lang.String getSubtype()
        This will retrieve the sub type (and hence appearance, AP taking precedence) For this annotation.
        Overrides:
        getSubtype in class PDAnnotation
        Returns:
        The subtype of this annotation, see the SUB_TYPE_XXX constants.
      • constructAppearances

        public void constructAppearances()
        Description copied from class: PDAnnotation
        Create the appearance entry for this annotation. Not having it may prevent display in some viewers. This method is for overriding in subclasses, the default implementation does nothing.
        Overrides:
        constructAppearances in class PDAnnotationMarkup
      • constructAppearances

        public void constructAppearances​(PDDocument document)
        Description copied from class: PDAnnotation
        Create the appearance entry for this annotation. Not having it may prevent display in some viewers. This method is for overriding in subclasses, the default implementation does nothing.
        Overrides:
        constructAppearances in class PDAnnotationMarkup