255
Views
3
Comments
[Printer Plugin] Printer Plugin - How to use it
Question
printer-plugin
Mobile icon
Forge asset by Truewind

Since I didn't have the time to build a sample application yet, and someone asked me how to use the plugin, here is a brief how to.

In the screen that you want to print you just need to:
1. insert a button/link in the screen;
2. in the action associated with the button/link call the public action "PrintCurrentPage" of the PrinterPlugin.

To test you need to generate a native app and install it in a device, it won't work in the Web Preview or with OutSystems Now.
When you tap the button/link it will open the operating system's printer screen:

2018-10-24 12-59-31
Caixeta

Luís Rondão wrote:

Since I didn't have the time to build a sample application yet, and someone asked me how to use the plugin, here is a brief how to.

In the screen that you want to print you just need to:
1. insert a button/link in the screen;
2. in the action associated with the button/link call the public action "PrintCurrentPage" of the PrinterPlugin.

To test you need to generate a native app and install it in a device, it won't work in the Web Preview or with OutSystems Now.
When you tap the button/link it will open the operating system's printer screen:

Thank you very much, worked fine!!!


UserImage.jpg
Preeti Kumari

Luís Rondão wrote:

Since I didn't have the time to build a sample application yet, and someone asked me how to use the plugin, here is a brief how to.

In the screen that you want to print you just need to:
1. insert a button/link in the screen;
2. in the action associated with the button/link call the public action "PrintCurrentPage" of the PrinterPlugin.

To test you need to generate a native app and install it in a device, it won't work in the Web Preview or with OutSystems Now.
When you tap the button/link it will open the operating system's printer screen:

Hello Luís Rondão,

I am using this plugin in my application and getting below error:

A fatal error has occurred. Please contact OutSystems support: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])' on a null object reference


error details:

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])' on a null object reference
at de.appplant.cordova.plugin.printer.reflect.Meta.invokeMethod(Meta.java:87)
at de.appplant.cordova.plugin.printer.Printer.initWebView(Printer.java:232)
at de.appplant.cordova.plugin.printer.Printer.access$300(Printer.java:62)
at de.appplant.cordova.plugin.printer.Printer$3.run(Printer.java:174)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)


Any pointer on this?

Thanks,

Preeti kumari

UserImage.jpg
Jacke KLea

The Printer module upholds printing archives in three ways: Print the ongoing page from inside the application. Attachment Viewer module - print a report opened with the Attachment Viewer utilizing the In App Browser. Foundation printing - print a report without the Attachment Viewer or the InAppBrowser. In that's kinds of printer's work for heat transfer mechanism, and used it with the proper 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.