// 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) + " Document";
PrintAttributes.Builder builder = new PrintAttributes.Builder();
builder.setMediaSize(PrintAttributes.MediaSize.ISO_A4);
PrintJob printJob = printManager.print(jobName, printAdapter, builder.build());
Error Message: "Sorry, That didn't work. Try Again."
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.
Please let us know if anyone has solution for this?
