HTML Print Option Doesnt Work!

Whats your template look like?

Hello JTRTech, This is how my Template Looks like.

[LAYOUT]
– General layout

c:\logo.bmp Ticket Date:{TICKET DATE} Time:{TIME} {ENTITIES} Ticket No:{TICKET NO} - {ORDERS} = {DISCOUNTS} [Total Gift:|{ORDER STATE TOTAL:Gift}] Total:|{TICKET TOTAL} {PAYMENTS} =
T H A N K Y O U
[DISCOUNTS] {CALCULATION NAME} %{CALCULATION AMOUNT}|{CALCULATION TOTAL}

[PAYMENTS]
{PAYMENT NAME}|{PAYMENT AMOUNT}

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

[ORDERS:Gift]
– Format for gifted orders
- {QUANTITY} {NAME}|GIFT
{ORDER TAGS}

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

[ORDER TAGS]
– Format for order tags
* {ORDER TAG NAME} | {ORDER TAG PRICE}

[ENTITIES:Table]
– Table entity format
Table: {ENTITY NAME}

[ENTITIES:Customer]
– Customer entity format
Customer: {ENTITY NAME} | {ENTITY DATA:Phone}

Use the code insert as forum will strip code, see this post;

Oh sorry about that !! Didn’t know it.

[LAYOUT]
-- General layout
<div style="font-weight:bold;font-size:13px">
<BMP>c:\logo.bmp
<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}

Thanks and what does your print look like?

Thanks JTRTech, Thants my problem it doesn’t print at all. Printer only prints under Windows printer mode.

Hmmm, am not at the desk at the moment but sure I have used HTML printer with my laser printer.
Can you send a screenshot of your;
Printer settings for that printer
Print Job
Template page
The action which fires the print job
The rule which contains the action for the print job.

However if it prints fine as Windows Printer (as in from samba set as windows printer not printing from windows) might be an issue with your printer accepting HTML.

First thing I see is no closing div tag before you started another div this may not solve your issue but you should immediately close a div its not a good practice to do them all together at end.

Can you not nest <div>'s then?

Thanks for the replies guys !
@JTRTech I am making the screenshots for you, But as far as I know i didnt change anything in Print automations and the program is in original status. @Jesse I have no changed anything in the original given template which i found under this tutorial [New 4.1.18] HTML Printer Improvements
May be its a Problem with my printer accepting html as you said JTRTech.

1 Like

Yes your right that was a nested tag. I didnt look closely I just followed the open and close. Perhapse it is a printer setting.

Looking back I did try a different template on my laser printer and it seemed to ignore anything inside the html divs,
Will experiment a little more but got to head out so won’t be till tomorrow.
I know html worked fine when I tried a brother label printer html was fine but it was a while ago and I thought I was using html formatting code in windows printer option -but like I said it was a fair few weeks ago and am probably wrong.
If selecting html printer what actually gets sent to the printer? Does samba output?

Hello JRTTech Thanks for the reply,

Well I tried as mentioned Setting a HTML template and print via normal Windows Printer, In that case Printer do print but as a normal ticket ignoring div tags.

and selecting HTML printer, the printer gets nothing but as a pdf i can get a samba out put so i guess there is nothing wrong with settings. This gets me really confused.

That sounds like what happened to me with the laser printer.
Maybe the printer does not like the div tags.
Thinking back I think for the label printer I didn’t use div tags but just style tags.
What were you trying to achieve with the div tags?
Looking at your template there is nothing that needs divs and could be done with simple style tags :smile:
I know that’s not a solution/answer but try it.

I was first trying to test it and then start styling :smile: ,anyway I thought of buying a printer anyway. Do you have any good recommendation for a printer that I could use HTML styling with. Much appreciated.

Sorry, no recommendations from me yet.
Would also be interested.
I have a preference for small hp mono lasers like the 1010 as toner is dirt cheap on eBay easy to change and transfer drum is part of toner cart so replaced with each cart. They are small and workhorses, ideal for invoices but not sure on html, have one so will try.
Am interested to use an a4 printer for more invoice type receipts and account statements to suite a hotel room bill or retail environment.

1 Like

Well I figured out a way to print html in my printer after all. I have set my ticket printer to print in Pdf and installed a third party application to automate the print. :smiley: … works like a charm :wink:

1 Like

Interesting work around.
Have you finished your template? would be intrigued to see how your layout comes out in the PDF

Havent finished the template yet, I was focused on making the printer works out. As far as i checked, the output looks fine an as expected. I will post a screenshot when I am done with the template. Thank you for your comment

Thanks,
Wanted to look at HTML template for invoice printing to allow a columned table type layout but if far down on the list for a quiet day.