-
Notifications
You must be signed in to change notification settings - Fork 20
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
Print html directly #11
Comments
Hi, |
Like @Blair2004 said, the purpose of this project is to write ESC/POS instructions in XML language. I'll explain. First of all, there are many thermal-printers that support standardized instructions. This standard is a protocol, named as ESC/POS. However, these instructions are a sequence of bits that follow some structure and to write a plain text may be a hard work. Hence, to write these instructions with XML tags may be easier than bit buffers. Thus, this library translates XML tags into ESC/POS commands (bit buffers). Because of that, to convert stylized HTML divs isn't the same thing that this library does. Answering your last question, the result of that translation XML to ESC/POS is a bit buffer. This information must be sent to the printer, through some kind of stream (eg: Bluetooth, USB, etc). Got it? |
@Blair2004 some characters like & , < , > ' , " I cannot get properly to print what is the reason please help? |
Probably you need to have them encoded into HTML entities... adding a < within the xml tags make that invalid. |
@Blair2004 give any example to encoded in to HTML entities |
I have a project where I need to build a web portal to print different labels and invoices. I have created a nice HTML div with styles and all which I am currently using for printing. But I need a kind of direct approach, and currently, it is going through the printing dialog where the user has to click on the print button to print the labels. I am thinking that your library can help me to bypass that. So thinking that, can I use my already existing div as input to your buffer? It is not exactly an issue, but kind of a suggestion or a question providing that I am missing something in the documentation.
And also please help me with the last part of your every example. You have mentioned sending the data to a stream like Bluetooth. Could you please tell me how I can do that?
The text was updated successfully, but these errors were encountered: