lukevp / ESC-POS-.NET

Efficient, Easy to Use Thermal Printing & POS (Windows/Linux/OSX, WiFi/BT/USB/Ethernet)
MIT License
503 stars 166 forks source link

Print the table on the check #211

Closed Kamaew closed 1 year ago

Kamaew commented 1 year ago

Hello

Can someone tell me how to make a table in the check so that it does not wrap text, but prints inside the cell

Many Thanks

igorocampos commented 1 year ago

That's very complicated, but not impossible. If I were you, I'd go old school and just do it with regular text, something like this

+-----------+-----------+-------------+------------+----------+
| Column 1  | Column 2  | Column 3    | Column 4   | Column 5 |
+-----------+-----------+-------------+------------+----------+
| Some data | More data | Lorem Ipsum | Two        |          |
|           |           |             | lines data |          |
+-----------+-----------+-------------+------------+----------+
| Another   | row       | with        | more       | data     |
+-----------+-----------+-------------+------------+----------+
|           |           |             |            |          |
+-----------+-----------+-------------+------------+----------+
lukevp commented 1 year ago

This is not really a concern of this library specifically - you would need knowledge of which printer you're printing to and what the paper width is. This library is more around managing the connections to the printers and creating the appropriate byte streams. I'd love to expand the scope to include paper widths and defaults like that, so feel free to open a PR! I am also open to implementing this for you if it's something you need, reach out for consultation rates. It's not something I personally need and I won't be adding this otherwise though.