title: How to write placeholder in pdf using itext
body: <p>I am using itext and converting html to pdf for that i am using this code </p>
  
  <pre><code>import java.io.FileOutputStream;
  import java.io.StringReader;
  
  import javax.sql.rowset.spi.XmlWriter;
  
  import com.itextpdf.text.Chunk;
  import com.itextpdf.text.Document;
  import com.itextpdf.text.PageSize;
  import com.itextpdf.text.html.simpleparser.HTMLWorker; 
  import com.itextpdf.text.pdf.PdfWriter;
  
  public class HtmlToPDF2 {
    // itextpdf-5.4.1.jar  http://sourceforge.net/projects/itext/files/iText/
    public static void main(String ... args ) {
      try {
        Document document = new Document(PageSize.LETTER);
        PdfWriter.getInstance(document, new FileOutputStream("testpdf1.pdf"));
        document.open();
  
        HTMLWorker htmlWorker = new HTMLWorker(document);
        String firstName = "&lt;name&gt;" ;
        String sign = "&lt;sign&gt;";
  
        String str = "&lt;html&gt; " +
              "&lt;body&gt;" +
                  "&lt;form&gt;" +
                      "&lt;div&gt;&lt;strong&gt;Dear&lt;/strong&gt;  "+firstName +",&lt;/div&gt;&lt;br/&gt;"+
                      "&lt;div&gt;"+
                          "&lt;P&gt; It is informed that you are selected in your interview&lt;br/&gt;"+
                          "   and please report on the &lt;b&gt;20 may&lt;/b&gt; with your all original &lt;br/&gt;"+
                          "   document on our head office at jaipur.&gt;"+
                      "   &lt;/P&gt;"+
                  "   &lt;/div&gt;&lt;br/&gt;"+
                  "   &lt;div&gt;"+
                      "   &lt;p&gt;Yours sincierly &lt;/p&gt;&lt;br/&gt;"+sign+"&lt;/div&gt;"+
              "   &lt;/form&gt;"+
              "&lt;body&gt;"+
              "&lt;html&gt;";
        htmlWorker.parse(new StringReader(str));
        document.close();
        System.out.println("Done");
        }
      catch (Exception e) {
        e.printStackTrace();
      }
    }
  }
  </code></pre>
  
  <p>but this will give me output </p>
  
  <blockquote>
    <p><img src="https://i.stack.imgur.com/Ec25U.png" alt="enter image description here"></p>
  </blockquote>
  
  <p>desired output is</p>
  
  <blockquote>
    <p><img src="https://i.stack.imgur.com/hga1t.png" alt="enter image description here"></p>
  </blockquote>
  
  <p>and is it correct way to create placeholder .. or i need to do anything else to create placeholder ? if yes then please suggest me .</p>