Class AddAnnotation

java.lang.Object
org.jpedal.manipulator.AddAnnotation
All Implemented Interfaces:
Manipulation

public class AddAnnotation extends Object implements Manipulation
Adds annotations
  • Constructor Summary

    Constructors
    Constructor
    Description
    AddAnnotation(PageRanges pages, Annotation[] annotations)
    Adds many annotations to many pages.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addAnnotationsToPage(org.jpedal.io.annotation.utils.AnnotBuffer mainBuffer, org.jpedal.io.annotation.utils.AnnotOREF pageRef, List<org.jpedal.io.annotation.utils.AnnotObject> annotationRefs)
    Adds the created annotations to the page
    void
    apply(org.jpedal.io.annotation.utils.AnnotInfo info)
    Applies the manipulation to the current document
    static void
    applyPage(org.jpedal.io.annotation.utils.AnnotInfo info, Annotation[] annotations, int pageNumber)
    Applies the add annotation operation for a single page

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • apply

      public void apply(org.jpedal.io.annotation.utils.AnnotInfo info) throws IOException
      Description copied from interface: Manipulation
      Applies the manipulation to the current document
      Specified by:
      apply in interface Manipulation
      Parameters:
      info - the AnnotInfo object for the currently loaded document
      Throws:
      IOException - if the manipulation cannot be applied to the document
    • applyPage

      public static void applyPage(org.jpedal.io.annotation.utils.AnnotInfo info, Annotation[] annotations, int pageNumber) throws IOException
      Applies the add annotation operation for a single page
      Parameters:
      info - the currently loaded document
      annotations - the annotations to add
      pageNumber - the page to add an image to
      Throws:
      IOException - if the document cannot be processed
    • addAnnotationsToPage

      public static void addAnnotationsToPage(org.jpedal.io.annotation.utils.AnnotBuffer mainBuffer, org.jpedal.io.annotation.utils.AnnotOREF pageRef, List<org.jpedal.io.annotation.utils.AnnotObject> annotationRefs) throws IOException
      Adds the created annotations to the page
      Parameters:
      mainBuffer - the main AnnotBuffer for the currently loaded document
      pageRef - the ref of the page the annotations will be added to
      annotationRefs - a list of refs of the created annotations
      Throws:
      IOException - if the document cannot be processed