Html Printer A4

Does the html printer support A4 size?

If you can use that printer to print A4 in Notepad then you can print HTML

Yes it prints but not in A4 size. Here is what it looks like

It prints fine as a Windows printer but I want to add a logo to it so I am trying the html printer.

Template taken from this forum. I tried it using width:100% but made no difference?

[LAYOUT]
-- General layout
<div style="font-weight:bold;font-size:13px">

<T>Ticket
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
{ENTITIES}
<L00>Ticket No:{TICKET NO}
<F>-
{ORDERS}
<F>=
<EB>
{DISCOUNTS}
[<J10>Total Gift:|{ORDER STATE TOTAL:Gift}]
<J10>Total:|{TICKET TOTAL}
{PAYMENTS}
<DB>
<F>=
<div style="font-size:15px;text-align:center;font-family:'Tahoma'">T H A N K   Y O U </div>
</div>
[DISCOUNTS]
<J00>{CALCULATION NAME} %{CALCULATION AMOUNT}|{CALCULATION TOTAL}

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

[ORDERS]
-- Default format for orders
<J00>- {QUANTITY} {NAME}|{TOTAL}
{ORDER TAGS}

[ORDERS:Gift]
-- Format for gifted orders
<J00>- {QUANTITY} {NAME}|**GIFT**
{ORDER TAGS}

[ORDERS:Void]
-- Nothing will print for void lines

[ORDER TAGS]
-- Format for order tags
<J00> * {ORDER TAG NAME} | {ORDER TAG PRICE}

[ENTITIES:Table]
-- Table entity format
<L00>Table: {ENTITY NAME}

[ENTITIES:Customer]
-- Customer entity format
<J00>Customer: {ENTITY NAME} | {ENTITY DATA:Phone}

Look like template generate correctly but was limit by paper size width. I don’t know if it media size is hardcode or using default printer setting.

Paper size on Printer is A4 as it prints fine using windows printer.

Most ppl here using Windows Printer to print A4 from what I search.

I use windows printer also but I wanted to add a logo to the A4 print. I thought I could achieve this using the Html printer. The logo does print but as you can see it only prints receipt printer size.

Some thermal printer drivers defaults to A4 and some drivers even does not have a setting for custom page size. So I’ve hardcoded it to standard ticket paper size. But this is something frequently requested so I decided to change it to obey printer’s size and margin settings. Let’s see if it will cause an issue for someone. I hope we’ll remember that change while answering possible HTML printer questions.

How about allow css style to set page size and margins in template?

Hi Emre will this be available in the next update?

Is it possible to add css styles for tables?
display:table; display:table-row; display:table-cell; etc.

What tables are you referring too?

Id like to be able to add divs to html printer template and apply css styles to them to create a table
Eg. display:table; display:table-row; display:table-cell; border: solid; width: 10%;

:slight_smile: HTML support implemented into SambaPOS to allow formatting tickets by using a language people familiar with. We support some common html tags and convert them to a printable document format but implementing full html+css support is beyond our intention.

In fact we already have a powerful document formatting language called XAML. It is HTML like and supports lots of document formatting features. I’ll check our options to publish that support as a printer type.

Thanks, I’m not looking for full html-css implementation, but seeing as you have added font, color, background, padding, and border styles I thought it would be possible to add other styles.
It recognizes the table tag so even if you could add the width attribute or width style it will work.
I’m sure others could also find this beneficial.

So @emre ive got a thermal printer, which Im trying to use with Samba, which wont print it because samba is choosing a different print size than the roll of paper in my printer. my printer supports multiple different paper sizes. What should I do? When I try and print it just comes up with this dialog.

The program is saying that Samba sent a 29mm print size wide paper to the printer:
However the size paper im using is 62mm wide.

Windows printer reads paper size from printer or in ESC/POS mode we use character count setting. Which printer type is it? Can you show your printer template, printer setting and a capture of the printout?

1 Like