Create the text block and flow of

Dear friends,

I need your help "very urgent."

How excess content stream of framework (table) text for the next block of text? The following image must be created.

Front

Float1.png

I need after-

Float2.png

Please suggest friends

Thanks in advance

KS

If you select a textframe, you already have a textframe. So, if you choose app.selection [0] .textFrames [0], this means an anchored within a textframe textframe.

And: You try to create your textframe on page 1. But you must add the new textframe on the page following the page of your choice.

So, try this one:

var curDoc = app.activeDocument;
var frame1 = app.selection[0];
var parPage = frame1.parentPage.documentOffset;
var frame2 = curDoc.pages[parPage+1].textFrames.add({geometricBounds: [50, 50, 100,100]});
frame2.previousTextFrame = frame1;

Tags: InDesign

Similar Questions

  • Apply effects to the text block and not the text

    I am trying to apply a shadow to a text block, but he keeps applied the effect of text rather than the text block.  I click on the text block, and then effects and shadow and object is selected in the 'Settings For' drop-down box.  However, he maintained the application of the shadow to the text, rather than to the text block.   I am doing this wrong, or is there something else I need to do?

    I use CS4 on Windows Vista.

    Thank you!

    Change your fill of paper or whatever is the shading color.

  • Is it possible to create the text block with non-uniform formatting is applied to the text?

    Hi all

    By this script

    var doc = app.documents.add(70, 20, 300, "Test", NewDocumentMode.RGB);
    var textLayer = doc.artLayers.add();
    textLayer.name = "Text";
    textLayer.kind = LayerKind.TEXT;
    
    var solidColorRef = new SolidColor();
    solidColorRef.rgb.red = 0;
    solidColorRef.rgb.green = 174;
    solidColorRef.rgb.blue = 239;
    
    var ti = textLayer.textItem;
    with (ti) {
         contents = "Blah-blah-blah!";
         kind = TextType.PARAGRAPHTEXT;
         height = new UnitValue("20 mm");
         width = new UnitValue("70 mm");
         position = [ new UnitValue("0 mm"), new UnitValue("0 mm") ];
         font = "MinionPro-Bold";
         size = new UnitValue("24 pt");
         color = solidColorRef;
         justification = Justification.CENTER;
    }
    

    So I can create a block of text with uniform like formatting

    SNAG-0011.png
    But, as far as I understand it, it is impossible to make an image and apply different sizes, colors, etc. (Please confirm or refute it).

    To achieve the result by script as follows:

    SNAG-0014.png

    The r to Browse datashows the formatting only to the beginning of this text.


    What I want to achieve is to take a block of text in the InDesign document and re-create it in psd-file. (The text must be editable)

    Y at - it another way to achieve this: by plug-ins, extensions, incantation, etc.?

    Kind regards
    Kasyan

    So that other things I noticed, it's text.jsx does not work with UnitValues. It uses the action Manager to work with textRanges. And it seems that Adobe changed the textItem units operating. Therefore, it is difficult to understand what values to use. Text.addNewTextLayer () and Text.modifyTextLayer () seem to what different values for the text of the same size.

    So below is an example updated the PS-Scripts-post on how to create a text layer with different textRanges using the current text.jsx.Note I've hard-coded sizes for that to work as I had hoped.

    function tsrDemo(doc) {
         var doc = app.documents.add(new UnitValue(70,'mm'), new UnitValue(20,'mm'), 300, "Test", NewDocumentMode.RGB);
         // we want to create a new text layer so create a new TextOptions with the contents as the argument
          var opts = new TextOptions("Blah-blah-blah!");
           // override the default settings
           opts.layerName = "Test";
           opts.kind = TextType.PARAGRAPHTEXT;
           opts.height = 800;// pixels
           opts.width = 200;
           opts.position = [ 0, 0 ];// pixels
           opts.justification = Justification.CENTER;
           opts.font = Text.findFont("Minion Pro Bold");
           opts.size = 6;// not sure what unit this needs
           opts.color = Text.toRGBColor(0, 174, 239);
    
           // create a new text layer with those options
         var layer = Text.addNewTextLayer(doc, opts);
    
           var opts = new TextOptions( layer.textItem);
           opts.contents = layer.textItem.contents;
           // now need to construct TextStyles for each range we want to set
           // for ranges we can only change the font, size, and color
           // first set a textStyle that matches the TextOptions
          var s1 = new TextStyle(undefined,undefined,undefined);
           // now set a textStyle for each different style you want
          var s2 = new TextStyle(undefined, 12, Text.toRGBColor(0, 0,0));// for some reason size values here are not the same scale as above
           // define more TextStyles as needed. here we only need one
    
          // Now create the set of ranges to apply the styles over
          var ranges = new TextStyleRanges();
           // the first range must start at 0.  In this example we want the first range unchanged
           // so we use the TextStyle that matches the TextOptions
           // this range covers the entire contents
          ranges.add(new TextStyleRange(0, opts.contents.length, s1));
           // this range covers the middle 'blah'
           ranges.add(new TextStyleRange(5, 9, s2));
            // we now add the ranges we set to the TextOptions
          opts.ranges = ranges;
    
           Text.modifyTextLayer(doc, opts, doc.activeLayer); 
    
        };
    
        tsrDemo();
    
  • How to put (Link) certain data of the text block and layer 1 layer 2

    Hi guys...

    I have a block of text that contains 5 element xml, these items showing in the xml of my InDesign file structure,

    above the text, structure is in layer 1.

    I want to put (Link) a given in layer 2 xml element and xml structure shouldn't be change.

    This is the code...

    var doc = app.activeDocument;

    var OnlineLayer = doc.layers.add ({name: 'online'});

    var monnoeud = doc.xmlElements [0].xmlElements [2];

    I want to link myNode element with layer named 'Online'

    Is it Possible, if possible please tell me...

    Thank you...

    Hi guys,.

    It does not work correctly...

    var doc = app.activeDocument;

    var OnlineLayer = doc.layers.add ({name: 'online'});

    var monnoeud = doc.xmlElements [0] .xmlElements [2];

    myFrame var = doc.pages [1].textFrames.add (OnlineLayer);

    myFrame.geometricBounds = [3, 3, 13, -20];

    myNode.placeXML (myFrame);

    myFrame.fit (FitOptions.FRAME_TO_CONTENT);

  • The text blocks and discussions all changed white

    Help - my long InDesign CS3 document changed all my blocks of text and the sons of white.  I can't see the box on the page for formatting.  I added a background colored on the master to see them on a temporary basis - but do not want this background.  I can't find anything in the area of preferences to change this.

    These elements assume the color of the layer, they are on. Check the color of the layer in the layers panel.

    Noel

  • Creating the text caption and selecting organize for rear...

    Hello

    I placed some text captions that I'm organizing at the front, but all I get is the option menu to align...

    Anyone experienced this?

    See you soon

    Sabine

    Not a great solution, but have found a way around, simply move the particular object upwards or downwards on the time line toured ;-)

    Really strange though! (IMO)

    See you soon

    Sabine

  • Type of entry in the text block

    Hello

    Is it possible to define a text frame on a master page and be able to enter text in the image in the document itself, without separate the text block and his master?

    This is for CS4.

    Thank you.

    It depends on the nature of your question. You must override the image on the document page (Shift click command) to add content, but anything that does not change on the page of the document is still linked to the main frame (such as size, position, fill, stroke, etc.). Is that what you mean?

  • Text wrapping will not be in the text block

    I am changing the content on a block of text in Illustrator using a JavaScript file.

    My method is as follows:

    changeLayer = doc.layers.getByName(textKeys[t]);

    changeLayer.textFrames.getByName(textKeys[t]).wrapInside = true;

    changeLayer.textFrames.getByName(textKeys[t]).contents = textArray [textKeys [t]];

    Basically, I set wrapInside to true and then I replace the content of the block of text with a string.

    However, rather than the text as you wish, Illustrator print everything on one line expands the size of the text block (and sleep) to adapt the text on a single line. Even when I put explicitly the width and height of the image in the script, it shrinks the text to fit on a single line in the rather enveloping framework. If I explicitly set the size of the police he then extends the framework once again, but only on a single line. Any ideas? Thanks in advance.

    Good evening

    Don't forget that you have different types of linked text frames. In vba, you can find the property THAT allow you to show that read only 3 types of text frames aiAtraText, aiPathText and aiPointText

    Patrice

  • Eratic behavior: book, the main text blocks and Cross References

    I'm on InDesign 2014.2. Mac.

    I'm working on a fairly large book. About 14 chapters / sections, about 400 total pages. There are also hundreds of cross references, almost all of them to anchor references.

    The design of the book is as simple as possible. There is no graphics, text blocks only.

    I use a single master page, with facing pages, and a block of text type. I used it throughout the production of the book, and the primary text flow worked well, chapter after chapter. Pages have been created automatically, and automatically flowed text.

    Maybe I need to change the page size of the book, and I also have a lot of editing to do which will reduce a lot of the chapters. I wanted to make sure all pages use the main text flow to do that, go as gently as possible.

    To my dismay, I discovered that although I used systematically throughout the book master text streams, all but three of my chapters have inexplicably lost their text stream. All images in these chapters have converted into ordinary images. That I edit the book, it's playing havoc with paging and referrals.

    I tried to restore the flow of text in one of the first chapters. It's easy to do, in theory.

    • Move the first page off to the side frame
    • Delete all pages except the first page
    • Command-shift-click on the first page to restore the flow of the main text
    • Copy and paste the contents of the old frame into the primary stream restored.


    When I do, the pages to move properly, and I'm back to having a chapter with a block of primary text on each page. Unfortunately, this breaks all cross-references that refer to this newly reorganized chapter and all references to the front in this chapter.


    I tried to do all that I could imagine. Only remove the frames and not pages. Try without the busy book. Nothing works. I tried the command update cross-references in the book menu. Has nothing.


    It seems impossible to redistribute the text in a new primary master framework, without completely breaking the cross references.

    I finally found something that seems to work:

    • Create a new master page at the end of the document.
    • Go to the last page of the history of the chapter and the last history image a link to the text block type on the page that you just created.
    • In the pages palette, delete all pages in the document, with the exception of the master page that you created.

    All text will be redistributed within the frameworks of masters, and cross-references (to and from the frame) seem to be intact.

  • Number of words and then pasting text into the text block

    I'm trying to create a javascript script that counts the words in a block of selected text, adds "WORDS." at the end and then paste at the beginning of this block of text with a "BOLD" character style applied. So he would look like:

    25 WORDS. Text text text text text. etc.

    I managed to find a way to create the character style, to count the words in the selected text block and give me an alert. But I'm not sure how to apply the character style and paste it at the beginning. Any help would be really appreciated. Here's what I have so far.

    Thank you

    -----------------------

    var curDoc = app.activeDocument;

    mySel var = app.selection [0];

    Create the style of wordcount

    If (! curDoc.characterStyles.item("wordcount").isValid) {}

    cStyle var = curDoc.characterStyles.add ({name: "wordcount"});

    }

    else {}

    cStyle var = curDoc.characterStyles.item ("wordcount");

    }

    cStyle.fontStyle = "Bold";

    //

    var mySelWords = mySel.texts.everyItem (). words.length;

    var mySelStoryWords = mySel.parentStory.words.length;

    Alert (mySelWords + "WORDS.");

    Hello

    further, through the selection, change the same way:

    var
         curDoc = app.activeDocument,
         mySel = app.selection,
         len = mySel.length,
         cStyle = curDoc.characterStyles.item("wordcount"),
         mySelWords, mString, curSel;
    
    if (!cStyle.isValid)
        cStyle = curDoc.characterStyles.add({name: "wordcount", fontStyle: "Bold"});
    
         while (len-->0) {
              curSel = mySel[len];
              if (curSel.hasOwnProperty ("insertionPoints") ) {
                   mySelWords = curSel.texts.everyItem().words.length,
                   mString = mySelWords + " Words. ";
                   curSel.insertionPoints[0].appliedCharacterStyle = cStyle;
                   curSel.insertionPoints[0].contents = mString;
                   }
              }
    

    Note that textFrame.words County is those visible only, so the other part of the text is excluded.

    If some of the answers have been useful - mark (their), pls ==> it's a good indicator for other researchers and a few points for me.., mlask.

    Jarek

  • I create a text field and I can't get the text to start typing in the upper left corner

    I created a pdf file for and added to the text boxes. The text want to start in the middle left of the text field and I can't seem to start in the upper left corner. Any suggestions?

    Set as Multiline field, under Properties - Options.

  • Script to remove all the images, text blocks, and the page numbers on a layer

    I have a 364 pages with 322 illustrations, photographs mainly, for offset printing.

    The photographs will be be overprinted with the varnish on a plate in the fifth, and I set it up as follows:

    On a new layer, (double layer 1) all photos are removed, but not their mounts.

    The frames are then filled with 100% black.

    All text blocks and page numbers must also be deleted.

    I realize I could have done this job easier if I put all the images on their own layer first, but unfortunately I do not have.

    And I don't do myself, script, so I was wondering if anyone has a script that will do...

    With the help of CC 2015.1 on Windows 7.

    Today, I don't have time to finish, which gave time to until now is the following:

      var myDocuments = app.documents.everyItem();
        var myLayers = myDocuments.layers.everyItem();
        var myStories = app.activeDocument.stories.everyItem().getElements();
        var myDoc = app.activeDocument;
        var myLayer = "palette"; //Add your layer name here
        var NewLayer = myDoc.layers.item(myLayer).duplicate();
        myDocuments.pageItems.everyItem().locked = false;
        myLayers.locked = false;
        myDoc.layers.item(myLayer).visible = false;
        NewLayer.name = "SampleNew";    //Add your new layer name here
    
                    re();
                    function re(){
                        var link, image;
                        var openDocs = app.documents;
                        var openDocsLen = openDocs.length;
                        for (var d = 0; d < openDocsLen; d ++){
                        currDoc = openDocs[d],
                        links = currDoc.links,
                        counter = 0;
                        myLayer.locked = true;
                        myDocuments.layers.item(myLayer).locked = true;
                            for (var i = links.length-1; i >= 0; i--) {
                                if (links[i].hasOwnProperty('relink')) {
                                    try {
                                        link = links[i];
                                        image = link.parent;
                                        image.remove();
                                        counter++;
                                    }
                                    catch (err) {
                                        $.writeln(i + " - " + err);
                                    }
                                }
                            }
                        }
                      }
    
            var myStories = app.activeDocument.stories.everyItem().getElements();
            for (i = myStories.length - 1; i >= 0; i--){
                var myTextFrames = myStories[i].textContainers;
                for (j = myTextFrames.length - 1; j >= 0; j--){
                myTextFrames[j].remove();
                }
            }
    

    If nobody finished the second finalized.

    Hug!

  • In Illustrator, I've created a text box and cannot change the font color of black.

    In Illustrator, I've created a text box and cannot change the font color of black. I tried changing each CMYK percentage individually, but it stays black. I have not had this before. What is going on?

    [Left the forum Cloud/Installer generic for program specific forum... MOD]

    akayshay,

    If I (put) understand, you can simply create a region Type, and then select with the normal (black) selection tool, then set the fill color to none in the Toolbox, and then click Add a new fill in the appearance palette and with the selected fill (yet) set your colour (ing) desired.

  • Hi, when I create a text box, and I type text in it, then I resize this text box, I want to see inside moving text at the same time I'm re-sizing of the text box. It does show me not LIVE what is happening inside the text box while I'm re-sizing text

    Hi, when I create a text box, and I type text in it, then I resize this text box, I want to see inside moving text at the same time I'm re-sizing of the text box. It does show me not LIVE what is happening inside the text box while I'm re-sizing of the text box and the same goes for the area of the image, I hope I could clarify my question.

    When resizing of a text box, click and hold for a moment before starting to resize. This will allow to see live redesign.

  • out the anchor text block and copy its contents

    Hi all

    I have a script that will be able to anchor to InDesign text block and it works well. Now my problem is that I released that anchored text frames and then copy its contents the same position where the text block was at anchor.

    Here's what I do:

    1. find and block of text of a document (using the find object, anchored by its applied object style).

    2. release the anchored object found.

    3 copy its contents the same position where it was anchored.

    For 1 and 2 rep, I maybe able to do but point 3 I have no idea.

    Hope someone can lend me the time to solve this problem.

    Thanks in advance for any help.

    -elmer

    then, instead of myFrame.releaseAnchoredObject (); use myFrame.remove ();

Maybe you are looking for