I am trying to generate a PDF from a HTML string using PdfDocument:
https://developer.android.com/reference/android/graphics/pdf/PdfDocument.html
String example:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Example</title>
</head>
<body>
<h1>Hello</h1>
</body>
</html>
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