title: Android: Unable to Print/PDF html document from WebView (version: 86.0.4240.75)
body: <pre><code>// Get a PrintManager instance
  PrintManager printManager = (PrintManager) getSystemService(Context.PRINT_SERVICE);
  
  // Get a print adapter instance
  PrintDocumentAdapter printAdapter = webView.createPrintDocumentAdapter();
  
  // Create a print job with name and adapter instance
  String jobName = getString(R.string.app_name) + &quot; Document&quot;;
  PrintAttributes.Builder builder = new PrintAttributes.Builder();
  builder.setMediaSize(PrintAttributes.MediaSize.ISO_A4);
  PrintJob printJob = printManager.print(jobName, printAdapter, builder.build());
  </code></pre>
  <p>Error Message: &quot;Sorry, That didn't work. Try Again.&quot;</p>
  <p>With the latest update of Android System WebView(version: 86.0.4240.75), unable to generate pdf or print using createPrintDocumentAdapter from my webview of html document. With older version of Android System Webview, it works good.</p>
  <p>Please let us know if anyone has solution for this?</p>
  <p><a href="https://i.stack.imgur.com/Mf02I.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mf02I.jpg" alt="PDF/Print error" /></a></p>