title: Html to PDF using PdfDocument
body: <p>I am trying  to generate a PDF from a HTML string using PdfDocument:</p>
  
  <p><a href="https://developer.android.com/reference/android/graphics/pdf/PdfDocument.html" rel="nofollow noreferrer">https://developer.android.com/reference/android/graphics/pdf/PdfDocument.html</a></p>
  
  <p>String example:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="UTF-8"&gt;
              &lt;title&gt;Example&lt;/title&gt;
          &lt;/head&gt;
          &lt;body&gt;
              &lt;h1&gt;Hello&lt;/h1&gt;
          &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>I know how to generate a PDF files from a WebView, but not from a string HTML. How i do this? 
  I don't found in stackoverflow.com or Google how do this with the native class PDFDOCUMENT</p>