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

how to print data html? #76

Open
TrieuNVD opened this issue May 22, 2023 · 1 comment
Open

how to print data html? #76

TrieuNVD opened this issue May 22, 2023 · 1 comment

Comments

@TrieuNVD
Copy link

i try convert data html to binary, after call sendRawData, sunmi don't understand need to print the data out as html. Can you help me?
data = <HTML><HEAD> <META charset="shift_jis" international="japan">' '</HEAD><BODY>【伝言】2016/12/01 10:12<BR><BR> <SPAN style="font-weight:bold">12' '</SPAN><BR><BR>1<BR>2<BR>3<BR>4<BR>5<BR>6<BR>7<BR>8<BR>9<BR>10<BR>11<BR>12' '<BR>13<BR>14<BR>15<BR>16</BODY></HTML>

  • method sendata:
    sunmiPrinterService.sendRAWData(data, innerResultCallback);
    sunmiPrinterService.autoOutPaper(null);
@kduma
Copy link

kduma commented Oct 14, 2023

You need to send ESC/POS commands. If you need to print HTML, first you need to convert it to a bitmap, and then print that using printBitmapcommand.

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

2 participants