code: public static void debugAnnotation(Rectangle rectangle, String styleClass, PdfWriter writer) {
        if (styleClass == null) {
           log.warning("not showing link to styleClass because there is no styleClass");
           return;
        }
        // only now we can define a goto action, we know the position of the image
        PdfAction act = PdfAction.gotoLocalPage(styleClass, true);
        writer.getDirectContent().setAction(act, rectangle.getLeft(), rectangle.getBottom(), rectangle.getRight(), rectangle.getTop());
     }
docs: adding a link (annotation) to information about the styleClass used
  
  @param rectangle the value of rectangle
  @param styleClass the value of styleClass
  @param writer the value of writer