Class PDAnnotationLine

All Implemented Interfaces:
COSObjectable

public class PDAnnotationLine extends PDAnnotationMarkup
This is the class that represents a line annotation. Introduced in PDF 1.3 specification
Version:
$Revision: 1.1 $
Author:
Paul King
  • Field Details

  • Constructor Details

    • PDAnnotationLine

      public PDAnnotationLine()
      Constructor.
    • PDAnnotationLine

      public PDAnnotationLine(COSDictionary field)
      Creates a Line annotation from a COSDictionary, expected to be a correct object definition.
      Parameters:
      field - the PDF object to represent as a field.
  • Method Details

    • setLine

      public void setLine(float[] l)
      This will set start and end coordinates of the line (or leader line if LL entry is set).
      Parameters:
      l - array of 4 floats [x1, y1, x2, y2] line start and end points in default user space.
    • getLine

      public float[] getLine()
      This will retrieve the start and end coordinates of the line (or leader line if LL entry is set).
      Returns:
      array of floats [x1, y1, x2, y2] line start and end points in default user space.
    • setStartPointEndingStyle

      public void setStartPointEndingStyle(String style)
      This will set the line ending style for the start point, see the LE_ constants for the possible values.
      Parameters:
      style - The new style.
    • getStartPointEndingStyle

      public String getStartPointEndingStyle()
      This will retrieve the line ending style for the start point, possible values shown in the LE_ constants section.
      Returns:
      The ending style for the start point.
    • setEndPointEndingStyle

      public void setEndPointEndingStyle(String style)
      This will set the line ending style for the end point, see the LE_ constants for the possible values.
      Parameters:
      style - The new style.
    • getEndPointEndingStyle

      public String getEndPointEndingStyle()
      This will retrieve the line ending style for the end point, possible values shown in the LE_ constants section.
      Returns:
      The ending style for the end point.
    • setInteriorColour

      public void setInteriorColour(PDGamma ic)
      This will set interior colour of the line endings defined in the LE entry. Colour is in DeviceRGB colourspace.
      Parameters:
      ic - colour in the DeviceRGB colourspace.
    • getInteriorColour

      public PDGamma getInteriorColour()
      This will retrieve the interior colour of the line endings defined in the LE entry. Colour is in DeviceRGB colourspace.
      Returns:
      PDGamma object representing the colour.
    • setCaption

      public void setCaption(boolean cap)
      This will set if the contents are shown as a caption to the line.
      Parameters:
      cap - Boolean value.
    • getCaption

      public boolean getCaption()
      This will retrieve if the contents are shown as a caption or not.
      Returns:
      boolean if the content is shown as a caption.
    • setBorderStyle

      public void setBorderStyle(PDBorderStyleDictionary bs)
      This will set the border style dictionary, specifying the width and dash pattern used in drawing the line.
      Parameters:
      bs - the border style dictionary to set.
    • getBorderStyle

      public PDBorderStyleDictionary getBorderStyle()
      This will retrieve the border style dictionary, specifying the width and dash pattern used in drawing the line.
      Returns:
      the border style dictionary.
    • getLeaderLineLength

      public float getLeaderLineLength()
      This will retrieve the length of the leader line.
      Returns:
      the length of the leader line
    • setLeaderLineLength

      public void setLeaderLineLength(float leaderLineLength)
      This will set the length of the leader line.
      Parameters:
      leaderLineLength - length of the leader line
    • getLeaderLineExtensionLength

      public float getLeaderLineExtensionLength()
      This will retrieve the length of the leader line extensions.
      Returns:
      the length of the leader line extensions
    • setLeaderLineExtensionLength

      public void setLeaderLineExtensionLength(float leaderLineExtensionLength)
      This will set the length of the leader line extensions.
      Parameters:
      leaderLineExtensionLength - length of the leader line extensions
    • getLeaderLineOffsetLength

      public float getLeaderLineOffsetLength()
      This will retrieve the length of the leader line offset.
      Returns:
      the length of the leader line offset
    • setLeaderLineOffsetLength

      public void setLeaderLineOffsetLength(float leaderLineOffsetLength)
      This will set the length of the leader line offset.
      Parameters:
      leaderLineOffsetLength - length of the leader line offset
    • getCaptionPositioning

      public String getCaptionPositioning()
      This will retrieve the caption positioning.
      Returns:
      the caption positioning
    • setCaptionPositioning

      public void setCaptionPositioning(String captionPositioning)
      This will set the caption positioning. Allowed values are: "Inline" and "Top"
      Parameters:
      captionPositioning - caption positioning
    • setCaptionHorizontalOffset

      public void setCaptionHorizontalOffset(float offset)
      This will set the horizontal offset of the caption.
      Parameters:
      offset - the horizontal offset of the caption
    • getCaptionHorizontalOffset

      public float getCaptionHorizontalOffset()
      This will retrieve the horizontal offset of the caption.
      Returns:
      the horizontal offset of the caption
    • setCaptionVerticalOffset

      public void setCaptionVerticalOffset(float offset)
      This will set the vertical offset of the caption.
      Parameters:
      offset - vertical offset of the caption
    • getCaptionVerticalOffset

      public float getCaptionVerticalOffset()
      This will retrieve the vertical offset of the caption.
      Returns:
      the vertical offset of the caption