Class TextAnnotation

java.lang.Object
org.jpedal.io.annotation.WritableAnnotation
org.jpedal.io.annotation.TextAnnotation

public class TextAnnotation extends WritableAnnotation
Class generates Text Annotation / Sticky note annotation
See Also:
  • Constructor Details

    • TextAnnotation

      public TextAnnotation(int page, float x0, float y0, float x1, float y1, FormObject form)
      Constructor for creating Text Annotation / sticky note annotation
      Parameters:
      page - the page number where annotation to be appeared (starting from 0)
      x0 - pdf based min x point
      y0 - pdf based min y point
      x1 - pdf based max x point
      y1 - pdf based max y point
      form - formObject for the annotation
    • TextAnnotation

      public TextAnnotation(int page, float x0, float y0, float x1, float y1, String text)
      Constructor for creating Text Annotation / sticky note annotation
      Parameters:
      page - the page number where annotation to be appeared (starting from 0)
      x0 - pdf based min x point
      y0 - pdf based min y point
      x1 - pdf based max x point
      y1 - pdf based max y point
      text - text to be appeared in text annotation
  • Method Details

    • getDictString

      public String getDictString()
      Overrides:
      getDictString in class WritableAnnotation
      Returns:
      Pdf specified dictionary string
    • getPopupString

      public String getPopupString(int parentObj)
      Description copied from class: WritableAnnotation
      Returns the dictionary of a popup annotation to write with this annotation. This implementation logs that popups are not supported for this annotation type and returns null.
      Overrides:
      getPopupString in class WritableAnnotation
      Parameters:
      parentObj - object number of this annotation's dictionary
      Returns:
      Pdf specified popup dictionary string, or null if there is no popup
    • getAPString

      public String getAPString(int parentObj)
      Description copied from class: WritableAnnotation
      Returns the appearance stream object to write for this annotation. Subclasses that have one reference it from WritableAnnotation.getDictString(), so this must be called first. This implementation records the object number and returns null.
      Overrides:
      getAPString in class WritableAnnotation
      Parameters:
      parentObj - object number the appearance stream will be written as
      Returns:
      Pdf specified appearance stream object string, or null if there is none