Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why printBitmap did the first print fail, and each subsequent print is the result of the previous one? #63

Open
githubLXD333 opened this issue Sep 15, 2021 · 3 comments

Comments

@githubLXD333
Copy link

No description provided.

@phabiulla
Copy link

Any news here?

@jeffreyvanhees
Copy link

Same problem here. Looks like it's something with buffer.

@jeffreyvanhees
Copy link

jeffreyvanhees commented Nov 24, 2021

I've found a solution. Print a newline after the bitmap like:

await InnerPrinter.printBitmap(base64, width, height);
await InnerPrinter.printOriginalText('\n');

Sunmi docs says in some places: "The force line breaker "\n" must be added to the
end of a line of content which not fully occupy". I think this is also the case for a bitmap that has not the full width or something. S

See https://file.cdn.sunmi.com/SUNMIDOCS/%E5%95%86%E7%B1%B3%E5%86%85%E7%BD%AE%E6%89%93%E5%8D%B0%E6%9C%BA%E5%BC%80%E5%8F%91%E8%80%85%E6%96%87%E6%A1%A3EN-0224.pdf (page 11)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants