Class TextMarkupAnnotation

java.lang.Object
com.datalogics.PDFL.Annotation
com.datalogics.PDFL.TextMarkupAnnotation
Direct Known Subclasses:
HighlightAnnotation, UnderlineAnnotation

public class TextMarkupAnnotation extends Annotation
Annotations that appears as highlighted content when added to a PDF file. Text markup annotations appear as highlights, underlines, or strikeouts when added to a PDF document in a PDF Viewer. When the edited PDF file is opened the markups appear in a pop-up window containing the text of the associated note.
  • Method Details

    • delete

      public void delete()
      Overrides:
      delete in class Annotation
    • getAnnotationFeatureLevel

      public double getAnnotationFeatureLevel()
      The minimum PDF version necessary to support the features used in this annotation.
      Overrides:
      getAnnotationFeatureLevel in class Annotation
    • setAnnotationFeatureLevel

      public void setAnnotationFeatureLevel(double featureLevel)
      Removes features not supported in the supplied version number.
      Overrides:
      setAnnotationFeatureLevel in class Annotation
    • getQuads

      public List<Quad> getQuads()
      A list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation.
    • setQuads

      public void setQuads(List<Quad> theQuads)
      A list of quads to mark. Each quad encompasses a word or group of contiguous words in the text underlying the annotation.
    • getAnnotatedText

      public String getAnnotatedText(boolean splitLines)
      The text that is marked by the annotation. Marked text is defined as text which falls within one or more of the quadrilaterals specified by the annotation's QuadPoints entry. If the annotation marks partial words, only those portions of the word that are bounded within the QuadPoints array will be returned. If the annotation marks partial characters, the characters that fall partially within the annotation bounds may not be returned.

      Parameters:
      splitLines - If true, text corresponding to each quadrilateral will be separated by CRLF characters. If false, text corresponding to each quadrilateral will be separated by spaces.
      Returns:
      The text marked by the annotation.