Reputation: 39519
I have a printing feature in my app which works on devices I tested with. Unfortunately I got this feedback from users:
Problem with galaxy S5: pdf print doesn't work. Error is: "fail to change settings".
I am printing like this - afaik correctly:
@TargetApi(19)
private fun createWebPrintJob(webView: WebView) {
val printManager = getSystemService(Context.PRINT_SERVICE) as PrintManager
val jobName = getString(org.ligi.survivalmanual.R.string.app_name) + " Document"
val printAdapter = WebViewCompat.createPrintDocumentAdapter(webView, jobName)
printManager.print(jobName, printAdapter, PrintAttributes.Builder().build())
}
Anyone else got this and perhaps a solution?
Upvotes: 0
Views: 24