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

add an html converter #3

Closed
bamarni opened this issue Oct 4, 2016 · 0 comments
Closed

add an html converter #3

bamarni opened this issue Oct 4, 2016 · 0 comments

Comments

@bamarni
Copy link
Owner

bamarni commented Oct 4, 2016

It should be a stateful converter, all style instructions would be registered until something actually needs to be written on the receipt, the text would be wrapped inside a span tag. The init command would reset the states.

For example :

ALIGN RIGHT
COLOR RED

PRINTLF value

INIT

PRINT value2

PRINTRAW
value4
value5
>>>

CUT

Would result in :

<span style="text-align: right; color: red;">value</span>

<br />

<span>value2</span>

<div style="text-align: right; color: red;">
value4<br />
value5
</div>

<hr />

For barcodes (#1), this library could be used to generate images to be displayed : https://github.com/boombuler/barcode

Multiple spaces should be replaced by &nbsp;.

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

1 participant