xslt - ZPL: How to horizontally centered a line of text on a label regardless of text length -


i need center text horizontally on label if length of text changes still remain centered.

i using xslt process format this:

        <!-- position home (3.75",4.00")-->         <xsl:text><![cdata[^ft494,812]]></xsl:text>          <xsl:text><![cdata[^a0b,62,62]]></xsl:text>        <!-- using fb command center text -->        <xsl:text><![cdata[^fb500,1,0,c]]></xsl:text>          <!-- field block -->         <xsl:text><![cdata[^fd]]></xsl:text>         <xsl:value-of select="/lb:label/lb:mydatafield" />         <xsl:text><![cdata[^fs]]></xsl:text> 

so output looks this:

example a:

        123 street 1234567890 1234567890 1234567890 

or

example: b

 123 street    1234567890 

so far text not centering , result looks this:

        123 street         1234567890 1234567890 1234567890 

i think problem stemming use of b "bottoms up" orientation in font. examples have of using ^fb font in n "normal orientation".

^xa^ll800   ^fo0,0^a0n,62,62^fb500,1,0,c^fd123 street^fs   ^fo0,0^gb500,100,2   ^xz 

results in:
enter image description here


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -