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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. image:: ../images/Printer/SDK-Difference-contrast.png :width: 800 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 .. code-block:: java :linenos: :emphasize-lines: 6 android { ... } dependencies { implementation 'com.github.iminsoftware:IminPrinterLibrary:V1.0.0.12' } 2. Refer to Demo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. image:: ../images/Printer/demo.png :width: 800 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 `iMin built-in printer developer document 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: * v1.1.0 `Download Print Demo source code `_ * v1.2.0 `Download Print Demo source code `_ 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 `_ Print Service F&Q ++++++++++++++++++++++++++++++++++ **Print paper specifications** .. image:: ../images/Printer/PrinterPageMode.png :width: 800 **Note:** The iMin printer supports 58mm and 80mm printing paper. This document uses 58mm printing paper as an example to explain the printer’s support parameters. The specifications of 80mm printing paper are similar A piece of 58 printing paper has a width of 58mm and an effective printing width of 48mm. The effective printing width is 384 pixels. The depth of M2 / D1 / D1 Pro paper chute is 40mm, and it can hold up to 40mm diameter paper. The depth of D1w / D4 / S1 paper slot is 80mm, and it can hold up to 80mm paper. What is the printer resolution? The printer resolution is 205DPI, the calculation formula is as follows DPI=384dots/48mm=8dots/1mm=205dots/in=205