title: Converting HTML to PDF using iText on Android. How to set UTF-8 (diacritics)?
body: <h2>I am trying the following</h2>
  
  <p>itextg 5.5.3 jar</p>
  
  <p>xmlworker 5.5.3 jar</p>
  
  <hr>
  
  <p><em>test.html</em></p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" lang="cs"&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  Test: ěščřžýáíé Ň ň ě Ě
  
  &lt;div style="font-family: 'Times New Roman',font-weight: bold,backround-color blue;"&gt;
    Test: ěščřžýáíé Ň ň ě Ě
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><em>ConvertHTMLToPDF.java</em></p>
  
  <pre><code>public class ConvertHTMLToPDF {
  
      public static final String RESULT = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Notes/test.pdf";
      public static final String RESORCE = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Notes/html/test.html";
  
  
          void convertHTMLToPDF() throws IOException, DocumentException {
  
              Rectangle pagesize = new Rectangle(415,1750);
              Document document = new Document(pagesize);
  
              PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(RESULT));
  
              document.open();
  
              XMLWorkerHelper.getInstance().parseXHtml(writer, document, new FileInputStream(RESORCE));
  
              document.close();
              System.out.println( "PDF Created!" );
          }
      }
  </code></pre>
  
  <p>Output <em>test.pdf</em></p>
  
  <ul>
  <li><p>Test: šžýáíé</p></li>
  <li><p>Test: šžýáíé</p></li>
  </ul>
  
  <hr>
  
  <p><strong>How to get <em>test.pdf</em></strong></p>
  
  <pre><code> Test: ěščřžýáíé Ň ň ě Ě
   Test: ěščřžýáíé Ň ň ě Ě
  </code></pre>