Package org.jpedal.manipulator
Class AddAnnotation
java.lang.Object
org.jpedal.manipulator.AddAnnotation
- All Implemented Interfaces:
Manipulation
Adds annotations
-
Constructor Summary
ConstructorsConstructorDescriptionAddAnnotation
(PageRanges pages, Annotation[] annotations) Adds many annotations to many pages. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 pagevoid
apply
(org.jpedal.io.annotation.utils.AnnotInfo info) Applies the manipulation to the current documentstatic void
applyPage
(org.jpedal.io.annotation.utils.AnnotInfo info, Annotation[] annotations, int pageNumber) Applies the add annotation operation for a single page
-
Constructor Details
-
AddAnnotation
Adds many annotations to many pages.Note: if you would like to add a FileAttachment annotation, see
PdfManipulator.attachFile(int, File, String, float[], float[])
- Parameters:
pages
- the pages to add the annotations toannotations
- the annotations to add
-
-
Method Details
-
apply
Description copied from interface:Manipulation
Applies the manipulation to the current document- Specified by:
apply
in interfaceManipulation
- Parameters:
info
- theAnnotInfo
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 documentannotations
- the annotations to addpageNumber
- 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 documentpageRef
- the ref of the page the annotations will be added toannotationRefs
- a list of refs of the created annotations- Throws:
IOException
- if the document cannot be processed
-