title: Add anchor to pdf using itext java and html
body: <p>I try generate pdf from html using IText java. I need create link anchor. The sample code below.</p>
  
  <p>Java code:</p>
  
  <pre><code>String k = pdfService.all(request);
  OutputStream os = response.getOutputStream();
  Document document = new Document();
  PdfWriter writer = PdfWriter.getInstance(document, os);
  document.open();
  InputStream is = new ByteArrayInputStream(k.getBytes());
  XMLWorkerHelper.getInstance().parseXHtml(writer, document, is);
  document.close();
  </code></pre>
  
  <p>Html code:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
     &lt;html&gt;
       &lt;head&gt;
         &lt;meta charset="utf-8"/&gt;
         &lt;title&gt;title&lt;/title&gt;
       &lt;/head&gt;
       &lt;body bgcolor="#ffffff"&gt;
        &lt;p&gt;&lt;a href="#anccc" &gt;GoTo&lt;/a&gt;&lt;/p&gt;
        ... some code ...
        &lt;p id="anccc"&gt;anchor&lt;/p&gt;
       &lt;/body&gt;
    &lt;/html&gt;
  </code></pre>
  
  <p>But in the end when you click on the link does not go to anchor</p></p>
  
  <p>What am I doing wrong?</p>