Printer

SDK Upgrade Description

Upgrade Notes

In order to make it easier for developers to call the built-in printer of iMin POS devices, and also to reduce the difficulty of developing printers and simplify app interfacing, we have reconstructed the iMin Print SDK.

Comparison of old and new features

_images/SDK-Difference-contrast.png

SDK V2.0

Connection mode:Bluetooth(Bluetooth device name:BluetoothPrinter), AIDL etc.

Third-party apps can print by connecting to the built-in printer. Features included in iMin printer: 58 and 80mm thermal printer with two printing specifications, cutter (some machines)

Developers can refer to the built-in printer development documentation to understand how the printer works and how the interface is invoked

Built-in printer doc:iMin built-in printer developer document V2.0

1. Access the SDK

The iMin Print SDK is obtained from a remote repository, and you only need to add a dependency in the calling module’s build.gradle

1android {
2    ...
3}
4
5dependencies {
6    implementation 'com.github.iminsoftware:IminPrinterLibrary:V1.0.0.12'
7}

2. Refer to Demo

_images/demo.png

You can refer to SDK to use the source code of Demo for development, click the link below to jump to download the corresponding Demo above

Github address

3. Web print

Demo Case

Desktop POS https://mp.imin.sg/WebPrint/D.html

Moblie POS https://mp.imin.sg/WebPrint/M.html

Note

SDK V2.0 does not require iMinprinterplugin to be installed,Enter the following URL address in the device browser to experience the H5 printing case

4. JavaScript API

Developers can use a JavaScript API to call the built-in printer

Link JS Print SDK

Demo Case

JS Printer demo https://mp.imin.sg/JSPrinter/index.html

JS print development documentation

Note

SDK V2.0 does not require iMinprinterplugin to be installed.

5. Flutter

You can refer to the SDK to use the source code of Demo for development, click the link below to jump to download the corresponding Demo above

Github address

Flutter print development documentation

SDK V1.0

Connection method: Bluetooth (Bluetooth device name: BluetoothPrinter), USB. The third-party APP can print by connecting to the built-in printer. The functions included in the iMin printer: thermal printers with two printing specifications of 58 and 80mm, cutters (some machines), cash drawers (some machines)

The printing function interface of iMin is basically multiplexed, and the model applicable to the document will be slightly different according to the model: D series (D1, D1w, D4), M series (M2, etc.), S series (S1 etc.) Development

The printer is compatible with the ESC & POS command, but it is slightly different from the standard ESC & POS command. Developers can refer to the built-in printer development document to understand the printer’s working mode and interface calling method, and understand the escpos instruction set supported by iMin through the instruction document Built-in printer development documentation V1.0

1. Refer to Demo

iMin provides printing demo and source code, and supports common printing functions, such as: printing QR code, printing barcode, printing pictures, printing texts in various languages, printing forms, etc. The demo supports both Bluetooth and USB connection methods. Developers need to adapt different SDK files to different iMin devices when developing printing functions.

SDK version list:

PS:The demo only supports iMin built-in printers, external Bluetooth serial network USB printers are not suitable for this demo.

2. iMinprinterplugin

iMin provides a printing plug-in support through the native printing function of android. Users can search for iMinprinterplugin through the iMin App Store, and after downloading and installing it, they can print the webpage content through the browser’s printing function.

Demo Case

Desktop POS https://mp.imin.sg/WebPrint/D.html

Moblie POS https://mp.imin.sg/WebPrint/M.html

Note

Enter the following URL address in the device browser to experience the H5 printing case

3. JavaScript API

Users can search for iMinprinterplugin through the iMin App Store, and after downloading and installing it,Developers can use a JavaScript API to call the built-in printer

Link JS Print SDK

Demo Case

JS Printer demo https://mp.imin.sg/JSPrinter/index.html

JS print development documentation

Note

Users can search for iMinprinterplugin through the iMin App Store, and after downloading and installing it.

4. Flutter

You can refer to the SDK to use the source code of Demo for development, click the link below to jump to download the corresponding Demo above

Github address

Flutter print development documentation