Follow

Start woking with a thermal printer SDK. It's written for android in Java.

They didn't provide any source code, but luckly, java program itself is the source code.

And now I decide to write my own SDK.

Yeah... "Vector<Byte>"

Also, the document is shit.

Document said "bitmap" has 3 modes. They are 0, 1 and 2. But in SDK, they use mode 3, which is totally undocumented and the code is spaghetti.

Another example, you can query the model string with a command, but the document didn't say anything about the return value. I have to dig into SDK and know they are using a 32 bytes buffer and treat it like a null-terminated string with default charset, I assume it's GB2312 or GB10 something something.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.