2 Replies Latest reply on Jun 5, 2015 5:09 AM by KevinLecocq

    How to vertical align a text relative to its text frame?


      I managed to create a TextFrame with text content inside.


      var textFrame = page.textFrames.add();
      textFrame.geometricBounds = [10, 10, 100, 60];
      textFrame.contents = "23";
      textFrame.fillColor = bgColor21;
      var text = lineNameTextFrame.texts.item(0);
      text.appliedFont = app.fonts.item("Ubuntu");
      text.fontStyle = "Bold";
      text.pointSize = 60;
      text.fillColor = white;
      text.justification = Justification.centerAlign;
      text.alignToBaseline = false;


      The text is centered horizontally using Jusitification.centerAlign, but I can't find in the documentation or debug the property to center vertically.

      However, in the InDesign UI, there is a feature:


      Does anyone know what text property do I need to set?