Android - Printing PDF file with added printer

114 Views Asked by At

I have a PDF file and I want to print it directly to the printer that is connected to my phone.

If I using the code below:

val printManager = context.getSystemService(Context.PRINT_SERVICE) as PrintManager
printManager.print(jobName, printDocumentAdapter, null)

It display a preview screen by system. I want to print directly.

How to do that? Please give me some solutions.

Thanks in advance.

0

There are 0 best solutions below