Thanks…its working now. I have a little issue that needs correction. the red arrow is the quantity order which i need to change to bigger font. Can this be done?
Use printer tags to adjust font size:
<Lxy> <Rxy> <Jxy>
x = height y = width
<L11> tall and wide <L10> tall <L01> wide <L20> even taller
I tried but its still same size. you can see i put “L22” on the quantity but still same size.
Are you testing in Notepad or printing on an actual printer? Notepad may not reflect it but the real printout would.
Ok its working on actual printer but only in ticket printer. when selecting text or html the font size remains same. I need to use text or html as I have multiple language. Anything we can do the change the font using text or html printer?
OK I’m able to edit the html now but having slight problem with spacing.
This is my printed kitchen order. I want to eliminate the large spacing marked in red arrow.
This is my template. I noticed that the spacing doesn’t happen when I don’t start the line with
div style…i want the spacing smaller like shown at the green arrow
Your [ORDERS] section has an extra
<L00> that is causing the blank line to appear.
None of your
<div> tags are closed. They should be terminated with
</div>, for example, like this:
After closing the div tags still facing the same big spacing, i noticed something wierd is the above green box even without tag closed not having spacing but bottom red box after put the div closed have big spacing
i noticed that when starting a new div tag it will create big spacing, did i do something wrong?
i dont know if this is the same issue, but i have also had an issue with large spaces (or line space being increased) when printing. Now I know this is definitely NOT an issue with my template as I have multiple templates for different things eg, sales, refunds, staff discount etc and the base of each template i copied and pasted to a new template.
This is my issue, for example I have staff discount receipt that prints when the sale has staff discount applied. In this case 2 receipts print a store copy and a customer (staff) copy. I used the same template for both ticket template, copying and pasting one to the other and the only changes made were changing the title to staff or store copy, adding a staff signature line to sign for discount and adding staff entity details to store copy.
when one of them prints the line spacing is increased but when 2nd one prints straight after the spacing is fine. I initially solved this by copying the template that prints fine into the template with large spaces and making my few amendments to it again and that seemed to work, but every now and then another of my templates starts printing with large spaces.
I dont know if this is an issue within samba or not as like i said the two templates are almost identical and there are no additional spaces anywhere.
I cant post screenshots at the moment as im not at PC that has the printer conected but i did manage to take a photo of example receipts that have this issue as shown below
These are from my online order receipts, 2 templates, a Store Copy and a Customer Copy. Both templates are identical and one was copied (cloned) from the other with the only change made being the header that says store copy or customer copy.
So i know the template isnt the issue as they are identical
Can you try with span tag? Also decrease char count per line setting. If you set it to 42 and increase font size SambaPOS will add space characters to complete line to 42 chars and since the font is larger it will break.
ill give this a try, thanks Emre
Yes, I was going to mention using
<span> instead of
<div> as well.
DIV is “block-level” while SPAN is “in-line”.
Think of DIV as a box. When you end a DIV, the box is closed, and your cursor is moved to the next line - even if you have several DIV tags in 1 line, the renderer will break them up and stack them on top of each-other.
SPAN on the other hand is not a box, so you can chain them on the same line, and your text stays on the same line.
Very important as well. Your lines may be “wrapping” because the font size being used eats up the character count.
I have a problem with my ticket layout since changing from a ticket printer to a HTML printer. I cannot align the amount on each item to the right - see ticket attached, I have attached my template too
Tahoma is not a fixed width font. That means length of
i letter and
o letter are not same. You need to use a fixed width font like consolas or lucida console.
I tried changing the fonts but no change, I tried some other HTML coding but couldn’t get it to work. Any other ideas?
Change all the fonts to Consolas or some other fixed-width font as @emre suggested. Alignment/justification simply will not work unless you do so.
It also appears that you have an unmatched DIV in your Template. There are more opening DIVs than closing /DIVs, so your results could be unpredictable.
Can you show us the updated Template please?
Here’s the updated template and ticket still with the problem
I tried also some html coding but to no avail.
Just a quick glance i can see you have spelt the font incorrectly you have used “lusida” several times and it should be “lucida”
This appears to happen for you order settings so could explain why its not aligning as the font is incorrect, i also cant see a closing div tag here before youve opened another???