Package com.datalogics.PDFL
Class LineAnnotation
java.lang.Object
com.datalogics.PDFL.Annotation
com.datalogics.PDFL.LineAnnotation
The line annotation displays a single straight line on a PDF page. When opened it displays a pop-up window containing the text of an associated note, placed at specific x/y coordinates for starting and ending points of the line.
-
Constructor Summary
ConstructorsConstructorDescriptionLineAnnotation(Page page, Rect initialRect, Point startPoint, Point endPoint) Create a new LineAnnotation at the end of a page's annotation array.LineAnnotation(Page page, Rect initialRect, Point startPoint, Point endPoint, int addAfter) Create a new LineAnnotation at a specific index in the page's annotation array. -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Generate a new appearance stream with the current annotation properties.doubleThe minimum PDF version necessary to support the features used in this annotation.doubleThe ending coordinate of the line, in user space.The starting coordinate of the line, in user space.voidsetAnnotationFeatureLevel(double featureLevel) Removes features not supported in the supplied version number.voidsetBorderStyle(String style) voidsetBorderStyleDashPattern(List<Double> dashPattern) voidsetBorderStyleWidth(double width) voidsetEndPoint(Point endPoint) The ending coordinate of the line, in user space.voidvoidsetStartPoint(Point startPoint) The starting coordinate of the line, in user space.voidMethods inherited from class com.datalogics.PDFL.Annotation
equals, getColor, getContents, getFlags, getInteriorColor, getNormalAppearance, getOpacity, getOptionalContentMembershipDict, getPDFDict, getRect, getSubtype, getTitle, hasRichTextData, isCurrentlyVisible, setColor, setContents, setFlags, setInteriorColor, setNormalAppearance, setOpacity, setOptionalContentMembershipDict, setRect, setTitle, toString
-
Constructor Details
-
LineAnnotation
Create a new LineAnnotation at the end of a page's annotation array. To create a LineAnnotation and place it elsewhere in the page's annotation array, use the version of the constructor that takes an array position.- Parameters:
page- The page to which the LineAnnotation is added.initialRect- A rectangle specifying the annotation's bounds, specified in user space coordinates.startPoint- The starting coordinate of the line, in user space.endPoint- The ending coordinate of the line, in user space.
-
LineAnnotation
Create a new LineAnnotation at a specific index in the page's annotation array.- Parameters:
page- The page to which the annotation is added.initialRect- A rectangle specifying the annotation's bounds, specified in user space coordinates.startPoint- The starting coordinate of the line, in user space.endPoint- The ending coordinate of the line, in user space.addAfter- Where to add the annotation in the page's annotation array. To add the annotation to the end of the array, pass a value of -2 or use the alternate version of this constructor that does not take an index (this is generally what you should do unless you have a need to place the annotation at a special location in the array). Passing a value of -1 adds the annotation to the beginning of the array. Passing other negative values produces undefined results.
-
-
Method Details
-
delete
public void delete()- Overrides:
deletein classAnnotation
-
getStartPoint
The starting coordinate of the line, in user space.If the line has leader lines, the start point represents the starting point of the leader line rather than the line itself.
-
setStartPoint
The starting coordinate of the line, in user space.If the line has leader lines, the start point represents the starting point of the leader line rather than the line itself.
-
getEndPoint
The ending coordinate of the line, in user space.If the line has leader lines, the end point represents the ending point of the leader line rather than the line itself.
-
setEndPoint
The ending coordinate of the line, in user space.If the line has leader lines, the end point represents the ending point of the leader line rather than the line itself.
-
getStartPointEndingStyle
-
setStartPointEndingStyle
-
getEndPointEndingStyle
-
setEndPointEndingStyle
-
generateAppearance
Generate a new appearance stream with the current annotation properties.The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance.
- Overrides:
generateAppearancein classAnnotation
-
getAnnotationFeatureLevel
public double getAnnotationFeatureLevel()The minimum PDF version necessary to support the features used in this annotation.- Overrides:
getAnnotationFeatureLevelin classAnnotation
-
setAnnotationFeatureLevel
public void setAnnotationFeatureLevel(double featureLevel) Removes features not supported in the supplied version number.- Overrides:
setAnnotationFeatureLevelin classAnnotation
-
getBorderStyleWidth
public double getBorderStyleWidth() -
setBorderStyleWidth
public void setBorderStyleWidth(double width) -
getBorderStyle
-
setBorderStyle
-
getBorderStyleDashPattern
-
setBorderStyleDashPattern
-