Print Barcode in center position

Post Reply
ctplate
Posts: 31
Joined: 02 Nov 2018, 04:24
Name: leonardo baldelli
Location: Italia - Anghiari

Print Barcode in center position

Post by ctplate »

Ciao Sergey, i can't print barcode in center position: this the code of my export model

<h1 style="text-align:center"><strong>PANTONE n&deg; {#206:N&deg; Pantone}</strong><br />
<br />
<br />
{#207:Colore 1}......{#213:q.t&agrave; colore 1}<br />
{#208:Colore 2}......{#214:q.t&agrave; colore 2}<br />
{#209:Colore 3}......{#215:q.t&agrave; colore 3}<br />
{#210:Colore 4}......{#216:q.t&agrave; colore 4}<br />
{#211:Colore 5}......{#217:q.t&agrave; colore 5}<br />
{#212:Colore 6 }.....{#218:q.t&agrave; colore 6}</h1>
&nbsp;

<h1 style="text-align:center"><strong>tot: {#261:Totale formula}</strong></h1>
&nbsp;

<h1 style="text-align:center">{#308:Bar Code}</h1>

This is the result
print.JPG
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Print Barcode in center position

Post by support »

Try next:

Code: Select all

<center>{#308:Bar Code}</center>
ctplate
Posts: 31
Joined: 02 Nov 2018, 04:24
Name: leonardo baldelli
Location: Italia - Anghiari

Re: Print Barcode in center position

Post by ctplate »

Modify code:

<h1 style="text-align:center"><strong>PANTONE n&deg; {#206:N&deg; Pantone}</strong><br />
<br />
<br />
{#207:Colore 1}......{#213:q.t&agrave; colore 1}<br />
{#208:Colore 2}......{#214:q.t&agrave; colore 2}<br />
{#209:Colore 3}......{#215:q.t&agrave; colore 3}<br />
{#210:Colore 4}......{#216:q.t&agrave; colore 4}<br />
{#211:Colore 5}......{#217:q.t&agrave; colore 5}<br />
{#212:Colore 6 }.....{#218:q.t&agrave; colore 6}</h1>
&nbsp;

<h1 style="text-align:center"><strong>tot: {#261:Totale formula}</strong></h1>

<center>{#308:Bar Code}</center>

After save code change

<h1 style="text-align:center"><strong>PANTONE n&deg; {#206:N&deg; Pantone}</strong><br />
<br />
<br />
{#207:Colore 1}......{#213:q.t&agrave; colore 1}<br />
{#208:Colore 2}......{#214:q.t&agrave; colore 2}<br />
{#209:Colore 3}......{#215:q.t&agrave; colore 3}<br />
{#210:Colore 4}......{#216:q.t&agrave; colore 4}<br />
{#211:Colore 5}......{#217:q.t&agrave; colore 5}<br />
{#212:Colore 6 }.....{#218:q.t&agrave; colore 6}</h1>
&nbsp;

<h1 style="text-align:center"><strong>tot: {#261:Totale formula}</strong></h1>
{#308:Bar Code}


Buy now it's ok. Ty
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Print Barcode in center position

Post by support »

There correct way to center barcode is insert table using editor with 1 row and 1 cell, remove border and width and set align by center.

We need use this way because barcode is not simple text and we can't apply default align for it.
ctplate
Posts: 31
Joined: 02 Nov 2018, 04:24
Name: leonardo baldelli
Location: Italia - Anghiari

Re: Print Barcode in center position

Post by ctplate »

Ciao Sergey, ty for support. i tried your solution: it is ok only if you set a limited width (i tried 5% to 20% it's ok, 30 and over not ok, barcode lose center position).
Ty very much.
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Print Barcode in center position

Post by support »

Just live Width param empty and in this case width will be auto. In this case should works ok.
ctplate
Posts: 31
Joined: 02 Nov 2018, 04:24
Name: leonardo baldelli
Location: Italia - Anghiari

Re: Print Barcode in center position

Post by ctplate »

Great Job!!!
TY
Post Reply