Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

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

share|improve this question

1 Answer 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)

share|improve this answer
    
Any idea how to do this if it's not paragraph text? –  Tom Dworzanski Jul 11 at 6:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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