Giter VIP home page Giter VIP logo

ionic-escpos-bluetooth-printer-sample's Introduction

ionic-escpos-bluetooth-printer-sample

Sample use of ionic 3 with a bluetooth esc/pos thermal printer using the plugin Bluetooth Serial

Only tested on android devices

Image of receipt

How to use

  1. Install ionic 3.x
  2. Fork this repo
  3. Using command line, go to folder where the repo is located and run npm install to install dependencies
  4. Inside the folder of repo, execute any of following commands: ionic cordova run --l --c for livereload with console logs or ionic cordova build [platform] --debug to compile and build app
  5. Test on your thermal printer

You can't do

  • Print Images
  • Print HTML
  • Print QR/BARCODE

Tested devices

  • zjiang 5802(58mm)

ionic-escpos-bluetooth-printer-sample's People

Contributors

luccasr73 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ionic-escpos-bluetooth-printer-sample's Issues

How to migrate to ionic 4?

I am getting this error, apparently there are parameters that do not work in ionic 4, how could I solve it?
question

Chinese Character

Thanks very much, I can print English and numbers,
but can't print Chinese word...., such as "謝謝",
how to fix it ?
Thanks a lot

Set a default printer

Hello your app works perfect! how I can set an default printer without choose?

thanks

This is not issue, i just have a question.

Sorry because i dont know how to contact you, i have a question. Your project is running good in my devices. But i have a similar project like you, i'm sure it is not wrong in code, because our code really similar the problem that i encountered is i can't connect to external printer, but if im using POS (Android and Printer integrated) it is working well.

Here is my cordova plugin

global packages:

@ionic/cli-utils : 1.0.0
Cordova CLI      : 8.0.0 
Ionic CLI        : 3.0.0

local packages:

@ionic/app-scripts        : 2.1.4
@ionic/cli-plugin-cordova : 1.4.1
Cordova Platforms         : android 6.0.0 browser 5.0.4
Ionic Framework           : ionic-angular 3.6.0

System:

Node       : v8.11.2
OS         : Linux 5.8
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

this is yours

global packages:

@ionic/cli-utils : 1.0.0
Cordova CLI      : 8.0.0 
Ionic CLI        : 3.0.0

local packages:

@ionic/app-scripts : 3.2.4
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Node       : v8.11.2
OS         : Linux 5.8
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed 

Please i need your opinion about my problem do you have any contact so i can talk freely ?

can print html data

I want to print a html coded data
instead of raw data can i pass whole html and print receipt.

Print barcode image

Hi, how can I also print a barcode image with this sample.

Thanks I tested and it works.

Integration with Ionic4

Hi,

Can you please update this code with ionic 4.

alert is not working with ionic4.

not able to add addInput in ionic4 using loop.

Please suggest how do i convert below in ionic 4 alerts.

` devices.forEach((device) => {
console.log('Devices: ', JSON.stringify(device));

                        alert.addInput({
                                name: 'printer',
                                value: device.address,
                                label: device.name,
                                type: 'radio',
                            });
                    });
                    alert.present();`

Getting error ReferenceError: Cannot access 'HomePageModule' before initialization

I am using Ionic v5. I installed using npm i esc-pos-encoder-ionic and added import EscPosEncoder from "esc-pos-encoder-ionic"; on Home Page. I am getting error ReferenceError: Cannot access 'HomePageModule' before initialization.

I have followed all the steps provided on https://www.npmjs.com/package/esc-pos-encoder-ionic .

Request @luccasr73 to look in to the issue.

I cloned this repo and follwed instructions. This repo works, but not if created in in Ionic 5

can't print chinese word

Thanks very much, I can print English and numbers,
but can't print Chinese word...., such as "謝謝",
how to fix it ?
Thanks a lot

Can't find printer on iOS

I have the Zjiang 58mm printer, and the printer isn't found on iOS. The list of devices is empty. Have you gotten this to work on iOS?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.