title: Add anchor to pdf using itext java
body: <p>I am trying to add anchor(named destinations) to pdf using itext java api. But it's not working.When I click the text , nothing happens.This is what I am doing .</p>
  
  <pre><code> Anchor anchor =
              new Anchor("Jump down to next paragraph");
      anchor.setReference("#linkTarget");
      Paragraph paragraph = new Paragraph();
      paragraph.add(anchor);
      document.add(paragraph);
  
      Anchor anchorTarget =
              new Anchor("This is the target of the link above");
      anchor.setName("linkTarget");
      Paragraph targetParagraph = new Paragraph();
      targetParagraph.setSpacingBefore(50);
  
      targetParagraph.add(anchorTarget);
      document.add(targetParagraph);
  </code></pre>
  
  <p>What am I doing wrong?. Any help</p>