Adjust the length of the text frame

Anyone know a script for InDesign CS4 that stretches all executives (vertically) in a document to adapt the script when it is in excess of text and shorten the frame when the text is not fill the entire height of the frame?

Try below a

myDoc var = app.activeDocument;

var mytextframe = myDoc.textFrames;

for (a = 0;

{

mytextframe [a] .fit (FitOptions.FRAME_TO_CONTENT)

}

It will not work if your text block insert in your page to other leave as overset text block.

Shonky

Tags: InDesign

Similar Questions

  • Try to adjust the text of the labels. Is constantly "could use the tool text because the channel of the target is hidden"?

    Try to adjust the text of the labels. Is constantly "could use the tool text because the channel of the target is hidden"?

    Hi Matthew,

    Go to the Palette layers and make sure all are highlighted, not just one

    Kind regards

    Tanuj

  • How mode change and get the coordinates of the text frame?

    Hello.

    There are two questions.

    1. how to change fashion using JavaScript?  writing-> selection

    ->

    2. how to get the text frame coordinates?

    Thank you.

    1 app.toolBoxTools.currentTool = UITools.SELECTION_TOOL;

    2. f.geometricBounds (where f is your block of text).

  • mount the text frame

    If installation (Cmd + Alt + C) text the text frame moves to the upper left corner of the text block. Is there a simple way to change this?

    You may need to explain why this is unexpected.

    By design, (if we agree with the design decisions or not), the resize frame is "pinned" top. When it contains left-justified text it to "attach" in the top left. Center-justified pins at the top in the Center and justified to the right pin at the top right... but it's always TOP... regardless of the applied vertical justification. I don't think it can be changed.

  • minimize the browser and automatically adjust the text

    Hello

    How can I reduce the browser and automatically adjust the text in Adobe Muse?

    I want to get the same effect as on this page:

    http://Bienz-photography.ch/

    on the departure site, there is the "Welcome" text and if I reduce the browser the text adjusts automatically.

    How can I do?

    Thanks for your help.

    What you re looking is delicate design which is not yet supported by Muse.

  • How to adjust the text layer

    Hello

    I have a pretty simple question on layer adjustments. I have a block of text and a picture, but what I want is for the text remains in front of the image and not behind it. How to set the text frame layer that is at the forefront and not hidden by graphics?

    Thank you.

    Rylenol

    You have in fact two layers, or are the two objects on the same layer? If you have two layers, open the Panel layers, and then drag the layer with the text is above the layer with the image.

    If you now have a single layer, create a second layer in the layers panel, and then select the text. You will see a little point to the right of the name of the layer that represents what is selected - which dot drag the new layer and it will move the selction to the new layer.

    Or you can change the order of stacking in a single layer. When you add new items each new object becomes the top of the stack. You can change this setting by selecting any item and in the menu object, choose layout > and one of the optins to move the object upward or down one position at a time or all the way at the top or bottom of the stack.

    Peter

  • CS4 automatically resize the height of the text frame to the baseline of the last line of text

    Hello

    Does anyone know of a script that automatically resizes all the heights of text frame in a document so that the bottom of each text block falls on the baseline of the last line of text in the text block? The image height must be determined by the text appearing and does not effect excess or stories of threads.

    Thank you!!

    Chung

    As text blocks have a property 'lines', lines have a property 'base' and executives have a 'geometricBounds' property, this quickly written javascript should do the trick for a block of selected text:

    app.selection[0].geometricBounds = [app.selection[0].geometricBounds[0],app.selection[0].geometricBounds[1],app.selection[0].lines[app.selection[0].lines.length-1].baseline,app.selection[0].geometricBounds[3]];
    

    (Whaddoyouknow: it can be done in one line)

    So let's loop over all the text blocks in your current document:

    allf = app.activeDocument.textFrames;
    for (f=0; f		   
  • automatically adjust the text when you zoom

    Hello.

    I m using Firefox 24 beta on nexus 7

    It was working fine until I upgraded to the latest beta version.

    then automatically adjust it the text has stopped working when you zoom in, so I have to scroll left and right to continue reading.

    any help?

    Hello, unfortunately the reformatting of the text now does that if you double click on a portion of text (and when the feature is enabled under settings). This was an intentional change in firefox for android 24.

    https://wiki.Mozilla.org/mobile/projects/Reflow_on_zoom

    https://Bugzilla.Mozilla.org/show_bug.cgi?id=847872

  • How to pass the content of an xml element in the text frame in inDesign Script

    var XMLFile = File.openDialog ("select XML Files... ») ;

    var doc = app.activeDocument;

    If (!) App.Documents.Length)

    {alert ("ERROR: Document not opened");}

    return;

    }

    doc.importXML (XMLFile);

    var firstFigureNode = doc.xmlElements [0] .xmlElements [1] .xmlElements [0];

    var lableNode = firstFigureNode.xmlElements [0];

    var lableNodeText = lableNode.contents;

    myFrame var = doc.textFrames.add ({geometricBounds: [-13, 13, 3, -3]});

    lableNodeText.move (LocationOptions.AFTER, myFrame.texts [0]);

    ========================================================

    My requirement is: == > > move the content of an xml element in the text by inDesign Script block, but XML InDesign file Structure should not be change & data in the XML Structure should remain as it was before...

    I tried to code above, but it does not work...

    Please can someone help me in solving this problem...

    It does not work correctly...

    It moves firstFigureNode in myFrame...

    firstFigureNode.placeXML (myFrame);

    ===>> For Apple Script try below Code ===>>

    myFrame markup using firstFigureNode

  • Erase only the text in the text frame.

    Hi all

    Thank you in advance.

    I want to remove the text in text frames. I want the blocks of text to keep.

    After that, I need to place a word in text doc.

    Can someone help me with the script.

    Concerning

    BG

    Hello

    If your goal is to remove the content of each textFrame of doc and keep them empty - I would start with this:

    app.activeDocument.stories.everyItem().content = "";
    

    Jarek

  • I can't text IMPORTER in InDesign CC without the Red Cross at the bottom of the text frame.

    Hello, I would like to import a manuscript of several pages, since OpenOffice Mac, in InDesign CC on online tutorials I see that all this is accomplished without problem. The import takes place directly on several pages.

    But when I try, I end up with a single filled text frame, and the small red cross at the bottom of the frame indicating that the text is too long. I do not want to paste the rest of the text with the mouse page-by-page. Can you please help me!

    Certainly it is stupid but I am looking for two days!

    Professional in preferences > text box "smart text reflow" is checked. Or so when you import your text, hold down the SHIFT key: this will create as many pages as necessary.

  • Adjust the text back in after effects CC with a script .jsx

    Is it possible to adjust the indents of text with scripts?  Specifically, I'm changing "margin left indent" and "first line indent" from a script.  I know that I can reset the paragraph styles (which defines the dashes to zero) with resetParagraphStyle(), but I'm trying to set the specified values.

    Thank you

    As far as I know, script doesn't have access to the dashes.

    Dan

  • How to place images in the text frame?

    Hi Experts

    I am just placing the image in text frame.

    If the text block is on the pasteboard image is then held successfully.

    If text from outside the pasteboartd block or exists outside the editing table and image not place in textframe while the text is inserted in the textframe.

    My coordinated picture text is:

    x = pt-81, 740

    y = pt - 138, 2750

    w = pt 760,123

    h = pt 1117,944

    It start from outside the editing table.

    indesign #target

    var myDocument = app.activeDocument;

    Try

    {

    var myTextFrame = myDocument.spreads.item (0).textFrames.item (0);

    myTextFrame.contents = "InDesign";

    myTextFrame.place(File("/C/temp/1.jpg"));

    }

    catch (e)

    {

    var k = 0;

    }

    I'm not understand that text is insert in textframe but image isn't the place.

    When I change the text block x = pt 10 and y = 10 points then this good script work.

    How place image in textframe which is outside the editing table?

    Thank you.

    Hello

    The bad news is that you cannot place a new object outside the editing table.

    The good news is that you can move...

    so:

    var myTextFrame=mDoc.spreads.item(0).textFrames.item(0),
    mPlace = [ myTextFrame.geometricBounds[1], myTextFrame.geometricBounds[0] ];
    
    myTextFrame.move([0,0]);
    myTextFrame.place(File("/C/temp/1.jpg"));
    myTextFrame.move(mPlace);
    

    Jarek

  • Problem with the text frames and photo...

    I use InDesign CS4 and design of a newsletter. My frames are not stated with the solid lines, but rather with weak points. In addition, they aren't boxes the same real, they have an X, with the top and bottom of the X closed. Is this normal? Things will work correctly as I move forward and begin inserting text, etc. ? I can't find any options to change that and what I tried did not work. Thanks a lot for your help.

    Not a problem at all (well, maybe a little).

    The x' are only the rectangles are created with the Rectangle frame tool, rather than with the Rectangle tool - or, indeed, with the text tool. X definition will disappear as soon as you click with the text tool inside. They must indicate the two different basic objects and can get a different default value object style applied.

    The usual way to draw a framework designated to receive the text is a drag with the text tool.

    The dotted lines can be a problem - which indicates the frames are created on a master page, rather than on the page you are working on. You can not click on type and in a setting which is located in a master page. Must be "freed" first (Ctrl/Cmd + Shift + Double-click, with the black arrow). There are arguments for and against defining managers text on master pages. You'll have to decide for yourself what to use.

    This image shows rectangles and rectangle frames on a master page (left) and "immediately" on a normal page (right):

  • How can I check if the paragraph is first the text frame column

    Hello


    How can I check with script, while adding paragraphs to the text block, if a paragraph that I am about to add is the first paragraph of his column TextFrame?

    First paragraph.

    Second paragraph.

    etc.

    etc.

    First paragraph
    with an additional line.

    Second paragraph.

    etc.

    etc.

    Does that help? Alert (app.selection [0] .lines [0] .textColumns [0] .lines [0] = app.selection [0] .lines [0])

Maybe you are looking for