Class Annotation

java.lang.Object
org.jpedal.annotation.Annotation
Direct Known Subclasses:
Link, org.jpedal.annotation.Markup

public abstract sealed class Annotation extends Object permits Link (not exhaustive)
Defines an annotation that can be used by the PdfManipulator.

As of PDF 2.0, there are 28 types of annotations.
We support the following types:

 Type           | Supported?
 -------------- | --------------
 Text           | Yes
 Link           | Yes
 FreeText       | Yes
 Line           | Yes
 Square         | Yes
 Circle         | Yes
 Polygon        | Yes
 PolyLine       | Yes
 Highlight      | Yes
 Underline      | Yes
 Squiggly       | Yes
 StrikeOut      | Yes
 Caret          | Yes
 Stamp          | Yes
 Ink            | Yes
 Popup          | No
 FileAttachment | Yes - But only using AttachFile
 Sound          | No
 Movie          | No
 Screen         | No
 Widget         | No
 PrinterMark    | No
 TrapNet        | No
 Watermark      | No
 3D             | No
 Redact         | No
 Projection     | No
 RichMedia      | No
 
  • Method Summary

    Modifier and Type
    Method
    Description
    org.jpedal.io.annotation.utils.AnnotDict
    Creates the annotation dictionary.
    static int
    getFlagsValue(boolean invisible, boolean hidden, boolean print, boolean noZoom, boolean noRotate, boolean noView, boolean readOnly, boolean locked, boolean toggleNoView, boolean lockedContents)
    Used to generate an integer which represents the set/unset flags for a PDF annotation.

    Methods inherited from class java.lang.Object

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

    • getDict

      public org.jpedal.io.annotation.utils.AnnotDict getDict()
      Creates the annotation dictionary.

      This method is considered as not part of the public API.

      Returns:
      a dictionary containing the relevant entries.
    • getFlagsValue

      public static int getFlagsValue(boolean invisible, boolean hidden, boolean print, boolean noZoom, boolean noRotate, boolean noView, boolean readOnly, boolean locked, boolean toggleNoView, boolean lockedContents)
      Used to generate an integer which represents the set/unset flags for a PDF annotation.

      See 12.5.3 for the full description of each flag.

      Parameters:
      invisible - Do not render the unknown annotation and do not print it even if the Print flag is set.
      hidden - Do not render the annotation or allow it to interact with the user, regardless of its annotation type or whether an annotation handler is available.
      print - Print the annotation when the page is printed unless the Hidden flag is also set.
      noZoom - Do not scale the annotation’s appearance to match the magnification of the page.
      noRotate - Do not rotate the annotation’s appearance to match the rotation of the page.
      noView - Do not render the annotation on the screen or allow it to interact with the user.
      readOnly - Do not allow the annotation to interact with the user.
      locked - Do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user. However, this flag does not restrict changes to the annotation’s contents, such as the value of a form field.
      toggleNoView - Invert the interpretation of the NoView flag for annotation selection and mouse hovering, causing the annotation to be visible when the mouse pointer hovers over the annotation or when the annotation is selected.
      lockedContents - Do not allow the contents of the annotation to be modified by the user. This flag does not restrict deletion of the annotation or changes to other annotation properties, such as position and size.
      Returns:
      the integer for the /F entry in an annotation dictionary