paystory-de / thermal-printer-cordova-plugin

Cordova wrapper for ESC/POS Thermal Printer library
Apache License 2.0
50 stars 39 forks source link

Printer Devices Suddenly Died #16

Open TriyogaDibrata opened 2 years ago

TriyogaDibrata commented 2 years ago

I got my printer device suddenly died after i tried to print over Bluetooth. It show the message "successfully printed', but the devices is died just after i run the function. Please help me to fix it

patrickbussmann commented 2 years ago

send me your code please. Then i can check what's wrong.

TriyogaDibrata commented 2 years ago

hi @patrickbussmann, thanks for your reply here is my code

printReciept() { ThermalPrinter.printFormattedText({ type: 'bluetooth', id: '5A:4A:9B:94:26:98', text: "[C]<u><font size='big'>Test Reciept</font></u>\n" + "[L]\n" }, function() { console.log("Prinnted Successfully"); }, function(error) { console.log('Printing error ', error.error); }); }

TriyogaDibrata commented 2 years ago

Update

I tried to request permission, the the app is always forced close

rizwanbao commented 2 years ago

same for my code printer stop working after 2 to 3 prints after restart app its start working again here is my code ThermalPrinter.printFormattedTextAndCut({

        port:  9100,
        type: 'tcp',
        address:  192.168.0.106,
        id: 'live-printer-02',
        text: '[L] Hello world \n',
        mmFeedPaper: 20
    }, function() {

    }, function(error) {

    });
TriyogaDibrata commented 2 years ago

Hi, On my case, i just remove the underline tag and everything just fine now Thanks

patrickbussmann commented 2 years ago

Ah good to know @TriyogaDibrata. I'll test by myself soon. No time at the moment 😣