1

How to get the width and height of text bounding box in Photoshop using ExtendScript

1 Answer 1

1

To grab the bounding box of the currently selected paragraph text layer:

var t = activeDocument.activeLayer.textItem;
alert(t.width + ", " + t.height);

This is documented in the JavaScript Scripting Reference (TextItem properties are listed starting on page 179)

1
  • Any idea how to do this if it's not paragraph text?
    – user13497
    Commented Jul 11, 2014 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.