Hello.
I need to print directly to printer , not show a preview and print. It takes too much time
I use the print framework with this function
Sub CreateWebPrintJob (wv As WebView)
Dim jwv As JavaObject = wv
Dim jPrintManager As JavaObject = jwv.RunMethodJO("getContext", Null).RunMethod("getSystemService", Array As Object("print"))
Dim jPrintAdapter As JavaObject = jwv .RunMethod("createPrintDocumentAdapter", Null)
Dim jobName As String = "Document"
jPrintManager.RunMethod("print", Array As Object(jobName, jPrintAdapter, Null))
End Sub
and the system will show a preview where I can print.
Because the printer its asigned by defoult and paper size , HOW CAN I PRINT DIRECTLY , without using the print preview ?
I looked in the print adapter informatios but found nothing about print directly
I read about to change parameters but not needs changes .The system uses the default parameters.
Please, coul someone help me?
On the other hand, I can save the webview to file and print directly to the bluetooth printer but allways have problems printing images. Maybe someone knows a good way to print images directly using SPP bluetooh and ESC comands . That would help me too much because I think would be faster
Thanks in advance for your time and help. I beg your pardon if my English is not good
I need to print directly to printer , not show a preview and print. It takes too much time
I use the print framework with this function
Sub CreateWebPrintJob (wv As WebView)
Dim jwv As JavaObject = wv
Dim jPrintManager As JavaObject = jwv.RunMethodJO("getContext", Null).RunMethod("getSystemService", Array As Object("print"))
Dim jPrintAdapter As JavaObject = jwv .RunMethod("createPrintDocumentAdapter", Null)
Dim jobName As String = "Document"
jPrintManager.RunMethod("print", Array As Object(jobName, jPrintAdapter, Null))
End Sub
and the system will show a preview where I can print.
Because the printer its asigned by defoult and paper size , HOW CAN I PRINT DIRECTLY , without using the print preview ?
I looked in the print adapter informatios but found nothing about print directly
I read about to change parameters but not needs changes .The system uses the default parameters.
Please, coul someone help me?
On the other hand, I can save the webview to file and print directly to the bluetooth printer but allways have problems printing images. Maybe someone knows a good way to print images directly using SPP bluetooh and ESC comands . That would help me too much because I think would be faster
Thanks in advance for your time and help. I beg your pardon if my English is not good