Link

Add annotations to a PDF with the Viewer

Adding annotations can be done from within the Viewer example using the annotations tab on the left of the GUI.

JPedal Viewer with the annotations tab visible

Shown above on the annotations tab are 10 buttons that allow the creation of different annotation types.
Below this is a list that will display annotations present in the file.

Adding Annotations to the Page

In order to add an annotation you can click one of the annotation buttons and then draw the annotation on the page. Some types are drawn in different ways as detailed below (types listed left to right, top to bottom).

  1. Circle
    Click and drag an area, upon release a circle annotation to match the dragged bounds is created.
  2. Square Click and drag an area, upon release a square annotation to match the dragged bounds is created.
  3. Line
    Click and drag an area, upon release a line annotation starting at the mouse press and ending at the release is created.
  4. Ink
    A free form of line is created as the mouse is dragged. Releasing the mouse will end the line and allow the creation of another in the same annotation.
    Changing the annotation type or clicking the ink again will stop the ink annotations creation.
  5. Polyline
    A series of straight lines are created by clicking at different points on the page and lines being added between that point and the last. Double click will end creation with this point being the last.
  6. Polygon
    A series of straight lines are created by clicking at different points on the page and lines being added between that point and the last. Double click will end creation with this point creating lines between it and the last, and between it and the first point.
  7. Highlight
    Click and drag over text on the page, an annotation is added as the mouse is dragged, highlighting the text from the first point and the last.
  8. Text
    Click a location of the page and a Text annotation icon is placed on the page and a corresponding pop-up for the annotation is also created.
  9. FreeText Click and drag an area, upon release a freetext annotation to match the dragged bounds is created. Once created the default text within can be altered and saved.
  10. Link
    Click and drag an area, upon release a link annotation to match the dragged bounds is created and a popup is display requesting a URL to link to.

Once the annotations have been created you can save the annotation to the file using File -> Save as

JPedal Viewer with the save menu item visible

Have more questions? Ask us on Discord