Class ExampleAnnotationHandler

java.lang.Object
org.jpedal.examples.handlers.ExampleAnnotationHandler
All Implemented Interfaces:
org.jpedal.external.AnnotationHandler

public class ExampleAnnotationHandler extends Object implements org.jpedal.external.AnnotationHandler
Example AnnotationHandler to adapt. It draws custom objects over each Link annotation on the page and, when one is clicked, offers to save the embedded file found through the annotation's /FS /EF entries.
  • Constructor Details

    • ExampleAnnotationHandler

      public ExampleAnnotationHandler()
  • Method Details

    • handleAnnotations

      public void handleAnnotations(PdfDecoderInt decode_pdf, Map<FormObject,String> objs, int p)
      example code to adapt
      Specified by:
      handleAnnotations in interface org.jpedal.external.AnnotationHandler
      Parameters:
      decode_pdf - an object that decodes the pdf
      objs - a map of form objects
      p - the page number containing the annotations we are handling
    • checkLinks

      public void checkLinks(Map<FormObject,String> objs, boolean mouseClicked, org.jpedal.io.PdfObjectReader pdfObjectReader, int x, int y, org.jpedal.examples.viewer.gui.SwingGUI currentGUI, org.jpedal.examples.viewer.Values commonValues)
      Description copied from interface: org.jpedal.external.AnnotationHandler
      called when mouse moves so you can react to context
      Specified by:
      checkLinks in interface org.jpedal.external.AnnotationHandler
      Parameters:
      objs - a map of form objects
      mouseClicked - check if mouse has been clicked- true if mouse has been clicked
      pdfObjectReader - an object reading the data of the pdf
      x - the x coordinate of the mouse position
      y - the y coordinate of the mouse position
      currentGUI - the current gui where mouse is moving
      commonValues - all common values