Center Logo or Barcode in Printer template

Hello,

Can someone please advise what is the correct way to achieve centering of logos and barcodes in printer templates?

So far I have tried multiple ways as advised on other posts; using the < EC > “enable center” tag.
Also tried using html center tags without result.

I am using a laser printer (HP Laserjet series). It prints the logo and barcode to the left position only.

  • Let me say the barcode does print on center if using my thermal receipt printer, unfortunately not the logo, for that I have edited the image to “manually” center.
  • I must find a way because some invoices I must print on A4 format.

Thanks !!!

Here is my template

[LAYOUT]
– General layout
– Ticket
< EC>
< BMP>C:\afipsamba\retiro.png
< EL>

< B11>
< C10>Store Name
< C8>Address
< C8>City

< L00>RUC: 94-939393939-2
< L00>I.BRC.: 94-939393939-2
< L00>Inicio de Act.: 01/02/2015

< F>-

< F>-
{ENTITIES}
< L00>TICKET UID:{TICKET UID}
< F>-
{ORDERS}
=

{DISCOUNTS}
[Total Gift:|{ORDER STATE TOTAL:Gift}]
{TAXES}
{SERVICES}
Total:|{TICKET TOTAL}

{PAYMENTS}

=

< L00> first
< EC>
< BAR>844
< EL>
< L00>second
< EC>
< BAR>848484848484848
< EL>

< L00>
< C10>G R A C I A S P O R S U C O M P R A!

hard copy

enable and disable centre.

logo line

best results come from flashing logo to printer and using xct command to print but enable and disable center work for samba rendered.

@JTRTech I do not understand what you are trying to say on the below:

" enable and disable centre.

logo line "

Regarding XCT, I dont believe regular printer can handle that.

oh, forum stripped the larger smaller characters;

<EC>
logo line
<DC>

tried that, it doesn’t like it

Its DC not DL for one.
What is the printer type in samba?

oh yeah my bad,

I have the printer set to HTML

OK, so in that case you need to use html to format layout… divs and tables etc.
Its all just left alighted because html doesnt see the pos formatting commands.
If your printing a4 you might be better to look at document printer type also.
Suggest you look around on forum for sample templates and examples.

Allright! got it working using simple div tag.

Thanks @JTRTech

< div style=text-align:center>
< BMP>C:\afipsamba\retiro.png
< /div>

2 Likes