Centering a TextLine

Adobe Community Professional ,
Dec 07, 2018 Dec 07, 2018

Copy link to clipboard

Copied

Dear friends,

Again I was mislead by the name of a property

oTextLine.TextLineType = Constants.FV_TEXTLINE_CENTER;

I thought that this would be useful to center the text within a given space. But I could not find how to use it.

I found a straight-forward method:

CenterTextLine2.png

Towards the end of my function I have inserted (aLenght is the space width):

  textLen = oTextLine.Width;

  boundLeft = (aLength*CM - textLen)/2;

  oTextLine.BasePointX = x0*CM + boundLeft;

TOPICS
Scripting

Views

170

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation