Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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 '14 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.