title: content from html missing in pdf created by iTextrenderer
body: <p>I am trying to create pdf from one html which has chinese char.
  in this i have got weird prob.
  the line from html which has chinese char is not completely shown in pdf generated from it.</p>
  <p>Below is my html:</p>
  <pre><code>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1?DTD/transitional.dtd&quot;&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;META http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
  &lt;title&gt;some title.&lt;/title&gt;
  
  &lt;style type=&quot;text/css&quot;&gt;
       .name
     {
           font-family: &quot;Arial Unicode MS&quot;;
           color:red;
           margin-left: 5px;
           margin-right: 5px
       }
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
   &lt;b class=&quot;name&quot;&gt;
  
  LLTRN,DEBIT,,,6841,FXW,,CNY,PAY,C,,,,DD,,ord par nm,,,,,,,CN,百威英博雪津(三明)啤酒有限公司,,,,,,,CN,20140617,,CNY,647438.24,OUR,,,,,,,,SHANGHAI,CN,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  
      &lt;br&gt;
  
  RDF,FTX,TEXT
  &lt;br&gt;
  &lt;/b&gt;
  &lt;br&gt;
  &lt;/body&gt;&lt;/html&gt;
  </code></pre>
  <p>below is my itext renderer code:</p>
  <pre><code>StringWriter writer = new StringWriter();
  Tidy tidy = new Tidy();
  tidy.setTidyMark(false);
  tidy.setDocType(&quot;omit&quot;);
  tidy.setXHTML(true);
  tidy.setInputEncoding(&quot;utf-8&quot;);
  tidy.setOutputEncoding(&quot;utf-8&quot;);
  //tidy.parse(new StringReader(documentJsoup.toString()), writer);
  tidy.parse(new StringReader(inputFileString), writer);
  writer.close();
  String  pdfContent = writer.toString();
  
  // Creating an instance of iText renderer which will be used to generate the pdf from the html document.
  ITextRenderer renderer = new ITextRenderer();           
  
  /*renderer.setDocument(doc, baseurl);
  renderer.layout();
  renderer.createPDF(os);
  os.flush();         
  
  // close all the streams
  //fis.close();
  //os.close();
  //instream.close();
   */
  ITextFontResolver resolver = renderer.getFontResolver();
  
  //renderer.getFontResolver().addFont(&quot;C:\\Windows\\Fonts\\arialuni.ttf&quot;, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
  resolver.addFont(&quot;C:\\Windows\\Fonts\\arialuni.ttf&quot;, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
  renderer.setDocumentFromString(pdfContent);
  renderer.layout();
  renderer.createPDF(os);
  </code></pre>
  <p>since i used font resolver and add font, chinese char are shown.... but pdf shows missing content.... last characters of that line (thats :&quot;AI&quot; from &quot;shanghai&quot; and next &quot;,CN,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&quot;) is not visible.... its seen something like:</p>
  <p><img src="https://i.stack.imgur.com/yQZ4d.png" alt="html2pdf: content missing" /></p>
  <p>i tried a lot to see whats wrong but couldnt find solution.
  can anybody from u help me in resolving this issue pls ?? TIA!</p>