Created
July 1, 2017 14:18
-
-
Save m7mdra/7546928cab94739d04b23837a2086a90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void createWebPrintJob(WebView webView) { | |
PrintManager printManager = (PrintManager) getSystemService(Context.PRINT_SERVICE); | |
PrintDocumentAdapter printAdapter = webView.createPrintDocumentAdapter(); | |
String jobName = getString(R.string.app_name) + " Document"; | |
PrintJob printJob = printManager.print(jobName, printAdapter, | |
new PrintAttributes.Builder().build()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment