HTML printing - Font and Size for different tags

@emre @Jesse Im trying to print using html and it has worked well, however, im cant seem to figure out how i can set different font/size/bold for the product name and item tags.

When i use this code the whole text has the same font size and type. How would i change to have for example the Quantity name in say standard font size 17, but the Item tags as size 20 but bold.

<div style="font-size:17px;font-family:MingLiu;text-align:left">
<EB><DB>

<L00>{QUANTITY} {NAME}
<J00>{ITEM TAG:tag1}|£{TOTAL PRICE}

Any help or point me in the right direction would be appreciative.

use div or span tag like you do on 1st line.
EB = Enable bold for ESC/POS printer

<div style="font-size:17px;font-family:MingLiu;text-align:left"><L00>{QUANTITY} {NAME}</div>
<div style="font-size:20px;font-weight:900;font-family:MingLiu;text-align:left"><J00>{ITEM TAG:tag1}|£{TOTAL PRICE}</div>
1 Like

Hi, Could you provide an example based on my print config above?

Thanks

Please try something like this:

<div style="font-size:17px;font-family:MingLiu;text-align:left"> 
<EB>
<L00>{QUANTITY} {NAME}
</div>
<div style="font-size:12px;font-family:MingLiu;text-align:left"> 
 <J00>{ITEM TAG:tag1}|£{TOTAL PRICE}
</div>
<DB>
2 Likes

I have tried it works but i get spaces between each line.

Any ideas, thanks in advance.

Try using <span> tag instead of <div>

1 Like

Thanks emre. Is there a way to make the price smaller next to the chinese writing? plus the formatting of the price doesnt stay right even though ive used justify and .

<EB>
<span style="font-size:30px;font-family:MingLiu;text-align:left">
<J00>{ITEM TAG:tag1}|£{TOTAL PRICE}
<DB>

i mean like this i have it…

 <EB>
    <span style="font-size:30px;font-family:MingLiu;text-align:justify">
    <J00>{ITEM TAG:tag1}|£{TOTAL PRICE}
    <DB>

Try to remove the text -align part

I have tried that but didnt work. :frowning:

I have decided to put the price at the top next to the english rather than the chinese, however still cant align even though ive used justify.

<span style="font-size:17px;font-family:MingLiu;text-align:justify">
<J00>{QUANTITY} {NAME}|£{TOTAL PRICE}
<EB>
<span style="font-size:25px;font-family:MingLiu;text-align:justify">
<L00>{ITEM TAG:tag1}
<DB>

Any ideas? Thanks in advance.

<J> tag aligns price by using configured character count for printer. Like the part where Total and Cash amount listed you should use a proper font size to make it work.

I’ve spent a whole day, still cant figure it out. Emre, ive tried different fonts and doesnt make any difference, what font do you suggest? If the product doesnt go onto two lines it aligns perfectly.

whats teh difference between having “text-align:justify” and “<J00>”?

div’s justified alignment adds spaces between all words until both sides of line reaches to the printable area boundaries. This is not what you want as you want to add spaces only before price until it reaches to the end. <J> tag does it by adding spaces to the point you define by adding a pipe (|) char. However that only works for single line. So if you need that long product names you can use smaller font to prevent wrapping.

If you need long names, big fonts and proper alignment you’ll need V5’s table layout support. By using HTML Table tags you can format lines properly.

Thanks emre, So no way to do it on V4.

Do you have telephone support for V5 customers?

Telephone support is a nightmare. I would much rather get support here vs telephone. Can you imagine how telephone support would go…

Caller: I have an error it happens when I close ticket
TechGuy: Ok can you explain to me your rules and actions that are under Rule A
Caller: What do you mean I think I see A
TechGuy: Sigh ok what does A look like
Caller: A is round and has some hair
TechGuy: ok thats not it so explain B
Caller: Why do you keep asking me to explain this stuff
TechGuy: because I can not read your mind and know what you really mean by what you say.

Sorry just my experience that Telephone support rarely is useful. Support from this forum is very fast and we can provide screenshots, etc to understand issues faster.

2 Likes

What was that A. Can anyone tell me that LOL?

1 Like

I was thinking VNC into PC while on the phone like most POS companies offer these days. Yes I agree 100% phone support will not be very efficient in solving issues.

I don’t think Emre has plan for that. I think he try to create partnership with local distributor/support.

BTW @jamies are you be able to print html from another terminal. I am having problem printing html printer type to printer that connect to server from another terminal.

The thing even with local support is its very hard to know every aspect of samba and to offer on demand support for every posible issue would be very tricky.
Given the flexibility and number of ways to do everything etc
I would happily offer samba support as a partner but then if emre is to endorse someone local for support he would need to know they can cover all bases and even the leaders have their area of expertise.
Does that make sense?