1

I would like for when I choose "fit frame to content" on a text box with overset text, the frame width is adjusted to fit the remaining text, rather than the height. The image should visually explain. overset text frame - fit to content

2
  • 1
    I don't believe you can. Fitting options never increase the width of a text frame.
    – Scott
    May 8, 2015 at 0:51
  • This is the kind of question which might be a good fit for the proposed Graphic Design Software Support stack. Please see the proposal and follow it if you think it might be useful. area51.stackexchange.com/proposals/86994/… May 8, 2015 at 9:54

2 Answers 2

1

Looks like it's not possible. The only way I could see it is you overlap your textbox above your frame to get the same effect.

1
  • Hi bitfrost, welcome to GDSE and thanks for your answer. If you have any questions, please see the help center or ping one of us in Graphic Design Chat once your reputation is sufficient (20). Keep contributing and enjoy the site!
    – Vincent
    May 8, 2015 at 9:55
1

Here is a little script that does, what you want to do:

#target InDesign

if(!(app.selection.length == 1
    && app.selection[0] instanceof TextFrame
    && app.selection[0].overflows)){ 
    alert("Error\rSelect exactly one text frame with overset text and try again."); 
    exit(); 
    };

var tf = app.selection[0];
var increment = 1;
var spreadWidth = calculateSpreadWidth();

while(tf.overflows){
    var bounds = tf.geometricBounds;
    tf.geometricBounds = [bounds[0], bounds[1], bounds[2], bounds[3] + increment];
    if((bounds[3] - bounds[1]) >= spreadWidth){
        alert("Result\rThe text frame has reached the width of the spread and will not be increased in width any further.");
        break;
        }
    }

function calculateSpreadWidth(){
    var spread = app.activeWindow.activeSpread;
    var firstPageBounds = spread.pages.item(0).bounds;
    var lastPageBounds = spread.pages.item(-1).bounds;

    return (lastPageBounds[3] - firstPageBounds[1]);
    }

This will keep the number of lines and just increase the text frame width until it fits without overset text or until it reaches the width of the spread, whichever happens first.

So far this is not a very sophisticated script, so it might not work when your formatting is more advanced (more than one column in your text frame, larger point sizes in your overset text, etc.).

You could save this script as a .jsx file, move it to your scripts folder and even assign a custom keyboard shortcut to it, so you could quickly use it with one keystroke when you have a text frame selected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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