HTML printer template help - additional spaces being added, how to remove?

I’ve had to change my templates to HTML due to my printer and also more flexibility on formatting

As you can see above the red line is html and it’s adding spaces after every line, after the words at the top, after each dashed line, after every order

The bit below the red line I haven’t converted yet and that’s how the above part did look (no additonal spaces) Before changing to html

Can anyone see why or how to fix this?

I’m uploading on my phone now so I’ll add the template in a sec when I login my laptop

[LAYOUT]
-- General layout
<XCT>27,112,0,25,250
<XCT>29,40,76,6,0,48,69,48,48,1,1
<div style="font-size:25px;font-weight:bold;text-align:center;font-family:'Calibri'">SALES RECEIPT</div>
<div style="font-size:10px;font-weight:bold;text-align:center;font-family:'Calibri'">=====================================================</div>
<div style="font-size:15px;font-weight:bold;text-align:left;font-family:'Calibri'">
<table>
<tr>
<td width="25">Qty</td><td width="200">Description</td><td width="45">Price</td>
</tr>
</table>
</div>
<div style="font-size:10px;font-weight:bold;text-align:center;font-family:'Calibri'">=====================================================</div>
{ORDERS}
<div style="font-size:15px;font-weight:bold;text-align:center;font-family:'Calibri'">{TICKET QUANTITY SUM}x Items Sold</div>
<F>=
[<J10>Sub Total:|£[=F(TN('{TICKET TOTAL}')+TN('{ORDER TAG TOTAL:Discount Item Custom Value}')*-1+TN('{ORDER TAG TOTAL:Discount Item Custom Percent}')*-1+TN('{CALCULATION TOTAL:Discount Ticket Total Percent}')*-1+TN('{CALCULATION TOTAL:Staff Discount}')*-1+TN('{CALCULATION TOTAL:Manager Discount}')*-1+TN('{CALCULATION TOTAL:Loyalty Discount}')*-1,'0.00')]]
<F>
<F>=
<EB>
{DISCOUNTS}
<F>
<F>
[<J10>Line Discount Total:|-£[=F(TN('{ORDER TAG TOTAL:Discount Item Custom Value}')*-1+TN('{ORDER TAG TOTAL:Discount Item Custom Percent}')*-1,'0.00')]]
[<J10>Ticket Discount Total:|-£[=F(TN('{CALCULATION TOTAL:Discount Ticket Total Percent}')*-1,'0.00')]]
[<J10>Staff Discount 10%:|-£[=F(TN('{CALCULATION TOTAL:Staff Discount}')*-1,'0.00')]]
[<J10>Owner Discount 100%:|-£[=F(TN('{CALCULATION TOTAL:Manager 0.00Discount}')*-1,'0.00')]]
[<J10>Loyalty Discount 10%:|-£[=F(TN('{CALCULATION TOTAL:Loyalty Discount}')*-1,'0.00')]]
[<J10>Discount Total:|-£[=F(TN('{ORDER TAG TOTAL:Discount Item Custom Value}')*-1+TN('{ORDER TAG TOTAL:Discount Item Custom Percent}')*-1+TN('{CALCULATION TOTAL:Discount Ticket Total Percent}')*-1+TN('{CALCULATION TOTAL:Discount Ticket Total Percent}')*-1+TN('{CALCULATION TOTAL:Staff Discount}')*-1+TN('{CALCULATION TOTAL:Manager Discount}')*-1+TN('{CALCULATION TOTAL:Loyalty Discount}')*-1,'0.00')]
<F>
<F>=]
<J10>Total:|£{TICKET TOTAL}
<F>
{PAYMENTS}
<F>
<F>=
<J10>Tendered Total:|£{TENDERED TOTAL}
<J10>Change:|£{CHANGE TOTAL}
<F>=
<F>
<F>
<C11>Served By:{USER NAME}
<C11>THANK YOU
<F>
<F>
<EC>
<BAR>{TICKET TAG:Barcode}
<EL>
<F>
<F>
<F>
<F>
<DB>
<F>=
<W00:16, 16, 16>Date:{TICKET DATE}|Time:{TIME}|TXN:{TICKET ID}
<F>=
<linebreak/>
<F>
<F>

{ENTITIES}

[DISCOUNTS]

[PAYMENTS]
<F>
<F>
<J00>{PAYMENT NAME}|£{TENDERED}
<F>

[ORDERS]
-- Default format for orders
<div style="font-size:13px;text-align:left;font-family:'Calibri'">
<table>
<tr>
<td width="25">{QUANTITY}x</td><td width="200">{ITEM TAG:Receipt Name} {PORTION: }</td><td width="45">£{TOTAL PRICE}</td>
</tr>
</table>
</div>
{ORDER TAGS}
[ORDERS:Gift]
-- Format for gifted orders
<J00>{QUANTITY} {NAME}|**FREE ITEM**

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

[ORDER TAGS]
-- Format for order tags
<J00> -{ORDER TAG NAME} | -£[=F(TN('{ORDER TAG TOTAL}')*-1),'0.00']
[<J00> -Discount Reason: [{ORDER STATE:DStatus}]]

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

That happened to me too.
t4

So I use document printer instead. :grin:

@emre is this a possible bug with the html printer setting, ive read a few posts on here saying the same thing, that when using html it seems to have a double line spacing set

I’ve changed category too issue as ive not seen any solutions other than people using a different printer type instead, but we could do to get this issue resolved for receipt prints

Changed back to question as i figured out why the top part of my ticket template appears double spaced and its to do with the table format, specifically the <tr> tag that adds a row, which is why there is a row before and after. If i delete the tr tags the rows disappear and it is normal spaced, but my text then also disappears so im reading up on this

The orders however i cant see any reason why they double line space on the ticket, any ideas?

Somehow margin setting for tables not set. It will work fine on next update.

2 Likes

Brill Thanks emre, what about the double line spacing on the order as they aren’t in a table, just seems to default with a line space after each one, will that be fixed too??

Do you mean order line? They are in the table.

Oh yea, I’ll double check that, I only recently changed that but I’m pretty sure when not in a table they still double line

I’ll try and test that again tonight

@RickH you should use Document Printer instead, it gives much better results and more flexibility than HTML printer.

1 Like

What format does it use? How do you change font, size etc ive never looked at document printer, assumed it was for like A4 invoices etc

That was just an example. Actually even ESC/POS printer can do A4 invoices if you wanted, paper size is irrelevant.

There is an example template there. It uses XAML format, if you understand HTML it should be straightforward.

Here are some examples of receipts I have done with it:

AeroAdmin_2018-08-27_19-16-27

Presentation_2018-03-27_21-23-55

1 Like

Didn’t realise HP made EPOS printers?

The additional spaces were due to a setting hard coded to samba, nothing we can do from our end, Emre has made the changes needed and I’ve verified it now works correctly in the latest update

Yeah, very expensive ones…