https://www.b4x.com/android/forum/threads/printing-and-pdf-creation.76712/
First of all I want to thank you Erel I'm using it in a real project and it has saved me many hours of development...
Unfortunately in certain circumstances it sends out an error message that I think could be due to a bug in the library. I describe the circumstances to you EXACTLY.
I have a BROTHER PJ-763 printer
I install the BROTHER control software
https://play.google.com/store/apps/details?id=com.brother.printservice&hl=en
The printer switches to the default printer, although I have another PDF printer
When I print with the library and the default printer is on, everything is fine.
But if I print with the printer turned off (picture 1), AND then try to select the PDF printer (picture 2), my application closes with the following error message (picture 3)
java.lang.RuntimeException: Cannot print a malformed PDF file
at android.print.PrintManager$PrintDocumentAdapterDelegate$MyHandler.handleMessage(PrintManager.java:1095)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6809)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
B4A 8
OnePlus 5t
Android 8.0.0
First of all I want to thank you Erel I'm using it in a real project and it has saved me many hours of development...
Unfortunately in certain circumstances it sends out an error message that I think could be due to a bug in the library. I describe the circumstances to you EXACTLY.
I have a BROTHER PJ-763 printer
I install the BROTHER control software
https://play.google.com/store/apps/details?id=com.brother.printservice&hl=en
The printer switches to the default printer, although I have another PDF printer
When I print with the library and the default printer is on, everything is fine.
But if I print with the printer turned off (picture 1), AND then try to select the PDF printer (picture 2), my application closes with the following error message (picture 3)
java.lang.RuntimeException: Cannot print a malformed PDF file
at android.print.PrintManager$PrintDocumentAdapterDelegate$MyHandler.handleMessage(PrintManager.java:1095)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6809)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
B4A 8
OnePlus 5t
Android 8.0.0
Attachments
Last edited: