CesarBalzer / Cordova-Plugin-BTPrinter

A cordova plugin for bluetooth printer for android platform
Apache License 2.0
81 stars 64 forks source link

image printing #1

Closed osamazahabi closed 5 years ago

osamazahabi commented 5 years ago

heyy when printing using url the method is not giving any output as if it was never called, and when trying the base64 image printing , weird shapes are being printed, how can i fix this?

img_20190117_131803

CesarBalzer commented 5 years ago

See discussion #issues/71 you probably need to cancel the default printer characters, send the pos commands for this

osamazahabi commented 5 years ago

I read about searching in the manual for hex characters, i did find them but now what? I'm sorry but I'm totally new in working with printers

CesarBalzer commented 5 years ago

I read about searching in the manual for hex characters, i did find them but now what? I'm sorry but I'm totally new in working with printers

I think you did not read the whole discussion, there are the snippets of code that were tested with base64, which would be the one here

https://pastebin.com/cZ1jXpny

osamazahabi commented 5 years ago

but my case is different because I'm not seeing Chinese and my printer is not the same as his mine is EXTECH S3750THS

CesarBalzer commented 5 years ago

Your case is different but the printer and POS, so you should see in the manual of your printer which are the characters to set the encoding and the type of characters, then mount a javascript with the commands of your printer as I showed in the pastebin link and do the tests.

If you get this code there is the link and run what happens?

osamazahabi commented 5 years ago

screenshot 40

CesarBalzer commented 5 years ago

Invalid int: "null" missing the last parameter, sorry this pastebin was before I changed the plugin, then take this paste and test please https://pastebin.com/24dN2j21

osamazahabi commented 5 years ago

img_20190117_144232

CesarBalzer commented 5 years ago

Invalid int: "null" missing the last parameter, sorry this pastebin was before I changed the plugin, then take this paste and test please https://pastebin.com/24dN2j21

sorry, today I'm running at work, I edited the last link in the paste, please test it again, the correct function was missing and you did not even notice it.

osamazahabi commented 5 years ago

i noticed and changed it and the above image is the output of the correct code and idk if this means anything but even the simple english text isnt printing correctly, it is printing arabic letters

CesarBalzer commented 5 years ago

so you should change the character encoding, I did this directly in java, now you have to go changing and testing as I did, here in Brazil we use iso 8859 1, if you notice java is setting this, maybe if you change it help, I even uploaded a commit in the morning altering it, I commented the lines that the encoding was setting. Sorry if I could not help you anymore

osamazahabi commented 5 years ago

okay thank you ill see what can I find

mostyn-grp commented 4 years ago

@CesarBalzer, using code from https://pastebin.com/24dN2j21, I get blank feed, I'm using JOLIMARK TP510.