title: ZPL How to center text with variable length
body: <p>I use Zebra Designer to create my labels. But I have a problem to center my elements.</p>
  
  <p>Indeed when I create a text box with Zebra Designer, it has a fixed length and when I replace the text inside (by a variable Php giving me the price for example) ==> if this text is larger than this that I have defined it does not focus.</p>
  
  <p><strong>So I would like to create a text box the width of the label and where the text would be centered inside, regardless of its length</strong></p>
  
  <pre><code>CT~~CD,~CC^~CT~
  ^XA~TA000~JSN^LT0^MNW^MTD^PON^PMN^LH0,0^JMA^PR5,5~SD15^JUS^LRN^CI0^XZ
  ^XA
  ^FT256,576^XG014.GRF,1,1^FS
  ^FT256,576^XG015.GRF,1,1^FS
  ^BY3,3,52^FT127,484^BCB,,Y,N
  ^FD&gt;:$customer_key^FS
  ^FT56,429^A0B,28,28^FH\^FDTEXT_TO_REPLACE^FS
  ^FT197,401^A0B,28,28^FH\^FDTEXT_TO_REPLACE^FS
  ^BY3,3,57^FT781,434^BCB,,Y,N
  ^FO256,23^GB0,559,1^FS
  ^PQ1,0,1,Y^XZ
  ^XA^ID000.GRF^FS^XZ
  ^XA^ID015.GRF^FS^XZ
  </code></pre>