There is NO command in PCL to do this. A printer driver will normally measure the printing width of the print string by consulting the character metrics contained in the font and position the text accordingly.
Similarly, if you can get the TFM files(font metrics) for the font in use and figure out how to extract the necessary data, then you could do the same thing. That is actually a pretty big job.
OR, if you know your way around HP-GL/2, have a look at the "LO" command, whereby you can center, right justify etc. text labels automatically.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.