giorgiofellipe / cordova-plugin-datecs-printer

Cordova plugin to print on Mobile Bluetooth ESC/POS Printers - Tested on Datecs DPP-250 Printer
MIT License
73 stars 60 forks source link

how to print characters with page code? #138

Open Matsuo32 opened 5 years ago

Matsuo32 commented 5 years ago

I have used this plugin to print text in Thai language . I added Charset UTF-8 and set page code(Thai is 255) printer then print test self , page code of printer is Thai (255) , when i try to print it not working. it work only English. I'm not sure about Charset is it should ? page code => https://i.stack.imgur.com/JDgiR.png

    public printText(text, charset = 'ISO-8859-1') {
        // ISO-8859-1,UTF-8
        return new Promise((resolve, reject) => {
            DatecsPrinter.printText(text, charset, function (success) {
                resolve(success);
            }, function (error) {
                reject(error);
            });
        });
    }