How to draw a table in HTML printer type

How to draw a table in HTML printer type with word-wrap when the text(product name) is so long? I want to draw it look like this one:

Also, How to reduce the margin for the bill? When i printed out, the margin is so big as following:

Thanks so much for your help!

If its margins it will be in the printer driver settings.
Be sure to check you have correct character count for printer paper width.
As for tables, cant help you on that one, sorry.

That is the first ticket I’ve ever seen with a table. Maybe it’s not common in the US but I’ve never seen a ticket with tables it seems messy to me.

I am not sure if that’s possible.

How to make a wordwrap for product name? when the name is so long, it will be cut out and i cannot see the total price.

Show your template please. We can help you better.

This is my template:

[LAYOUT]
-- General layout
<BMP>E:\documents\logo.bmp
<L00>Ngày:{TICKET DATE}
<L00>Thời gian:{TIME}
<F>-
{ORDERS}
<F>=
<EB>
<J10>Tổng cộng:|[=FF('{TICKET TOTAL}','#,##0')]
{PAYMENTS}
<J10>[Tendered:| {TENDERED TOTAL}]
<J10>[Change:| {CHANGE TOTAL}]
<C10>CẢM ƠN QUÝ KHÁCH
<DB>
<F>=

[PAYMENTS]
<J10>{PAYMENT NAME}|{PAYMENT AMOUNT}

[ORDERS]
-- Default format for orders
<span style="font-family:Tahoma;text-align:left;font-size:8px">
<J10>{QUANTITY}|{NAME}|[=FF('{TOTAL PRICE}','#,##0')]
</span>
{ORDER TAGS}

[ORDERS:Combo]
-- Format for combo orders
<J00>{QUANTITY} {NAME}|{TOTAL AMOUNT}
{ORDER TAGS}

Am pretty sure your character count is set too low, see how the ======= isnt full width.

I changed the character count to 36. The total price is lost now…:frowning:

pretty sure that will partly be related to your use of <span> as character count has always worked flawlessly for my but just use plain formatting.
on 80mm standard rolls 40 is about right.
but you defiantly have some margin issues

36 seems low try 40 or 48

i changed the character count to 40 and it became:

Also, I use HTML mode because i got encoding issue with Vietnamese characters. With Ticket Printer mode, the margin issue will be gone but character encoding is failed:

For orders get rid of the pipe between {QUANTITY} and {NAME} see what that does. Instead just put a space like {QUANTITY} {NAME}

In the HTML mode: encoding is ok, lost the price and margin is incorrect.

In the Ticket Printer mode: encoding is incorrect, too big font-size, word-wrap is ok, margin is correct