create the frame anchor text online

Hello!

I am trying to create a text block anchored from the results of a search. If I create the framework anchored among a selection it works no problem, but when I do it according to the results of a grep I get error "the text can be moved to its current location. Do you have ideas about how to solve that?

As a side question... when I create an object through script style, the text always block has a border... Why is this? (I created the style with another script)

doc = app.activeDocument;
app.findGrepPreferences = app.changeGrepPreferences = null;  
app.findGrepPreferences.findWhat = "~6";  
var myFinds = doc.findGrep();  
for (i = myFinds.length; i > 0; i--){
var os = doc.objectStyles.item ("Section");
var new_note = myFinds[0].insertionPoints[0].textFrames.add ({appliedObjectStyle: os, label: 'Section'});
var n = myFinds[0].texts[0].move (LocationOptions.atBeginning, new_note.insertionPoints[0]);
n.applyParagraphStyle (os.appliedParagraphStyle, false)
new_note.fit (FitOptions.frameToContent);
}

Thank you!
Christopher

test.png

Once you insert the object anchored pointers towards the passage of the text. So, you will need to compensate for this. A bit like this:

ip0 var = myFinds [0] .texts [0] .insertionPoints [0] .index + 1,.

IP1 = myFinds [0] .texts [0] .insertionPoints [-1] .index + 1;

...

...

var n = myFinds [0].parentStory.insertionPoints.itemByRange (ip0, ip1) .texts [0] .move (LocationOptions.atBeginning, new_note.insertionPoints [0]);

Legal notice, sinppet code written without coffee, will very probably need tweaking.

Second question,

Make sure that the style of the object has enableStroke set to true and strokeWeight set to 0

Tags: InDesign

Similar Questions

  • Interactive PDF: creating forms and anchor text field

    Hi, I'm new to this and have an urgent job, so please help:

    I create an interactive PDF file, adding fields of text placed above the lines and wonder how I can:

    1 ANCHOR these fields for text, we use for photo boxes or anchor text... and

    2. place the text fields anchored above the lines that I typed in the space allocated for this text field.

    Any help would be appreciated, thanks!

    You can use an anchored object. Place your cursor after the text and create an anchor, this will put an anchor point. Once the image is inserted, it can be converted into a text field. Use the 'Relative to anchor Marker' option, which will allow the anchor around if text is added.

  • cannot create the file of text using fpga

    I spent an entire day to solve this problem, if someone help me please!

    I have two types of registration data, movement and time. I looked up NI EXAMPLE FINDER and copied the format to create the text file. but the file dialog box is not pop up. So I thought I did something wrong with the function of the dialog box, but when I copy the first part of my code, the dialog box appears. If anyone can check my host vi and tell me what is the problem? I downloaded the target vi as well.

    I use crio 9074, and vi is made in mode of fpga.

    Hi Ultrafrog,

    The RT vi or vi FPGA screws?

    In FPGA, you cannot file i/o. But you should be able to do this in your vi RT it seems you are trying to apply it on the FPGA.

  • Update table of contents (frame) in the primary anchor text stream?

    I understand that a table of contents of InDesign should sit on its own page or in a separate text frame, so it can be easily maintained and updated.

    Help of InDesign said: "avoid threading the TOC to other blocks of text frame in the document. If you replace the existing table of contents, the whole story will be replaced by the update table of contents. »

    Fine and understand. However, I'm working on a project where I need all the content (from the illustration of the cover of the last line) to sit in the primary sequences of the spread of master - including the table of contents.

    Here's what I've tried: I open the Table of contents dialog, made all the settings and click OK. Clicking on will now create a new text frame with the table of contents, which can be changed by selecting this image by using "Update Table of contents. So far so good.

    I cut this framework and then inserted as a framework anchored in the stream text main, just as I have anchor a table, image, etc.. However, after anchor this TOC frame, I can not more updated by using "update the Table of contents. It is just another framework, not recognized as the table of contents more.

    Is there another way to have a 'live', table being updated content that will float in the primary text flow?

    Thank you.

    Ariel, I think you should give up on e-mail responses - empty again...

    PlainMartin,

    I could make this work in CS6 (and I would consider another version that allows to drag the anchored object rather than cut and paste). Now the SHIFT key and dragging the blue handle in the main story, I could anchor the table of contents, and when the text cursor was in it I could update. Make sure you anchor in a separate paragraph that uses a style that is NOT included in the table of contents, or he'll start on update.

  • Need help to create the logo graphic text saved as a PDF. (Beginner)

    I use Photoshop CC 2015.

    I want to create a logo using the part of a chart in a PDF (no copyright issues).

    The chart in PDF document looks like Word of the text with a rectangular colored background. I think the word was created with the help of a police and a couple of letters have been adjusted by the designer to make it better. I just want to use the word itself for my logo, but I don't know how to extract the information.

    Once I extracted the image I want to save it as an SVG file so I can use the Glyphter online services to convert it to a font that I can use the Apple Motion 5 for inclusion in an intro scene.

    Export as SVG option will work to allow me to use Glyphter?

    Guidance have really enjoyed.

    Hi there must be many ways to do this, including just draw your screenshot in Illustrator. If you are comfortable with the tool pen which is by far the most accurate way to do it, but its also very long. What I did was to use your perforated CAP and make a selection by using the magnetic lasso tool by using the default settings. This tool works very well for this kind of thing.

    Then in the palette drawn convert selection to path.

    What you have now is a quick alternative and dirty to the use of the pen tool. Indeed I had to change the path above

    with the pen tool to get the bend on some of the correct letters. Typographers spend days to address these

    forms so that they are fair, so, as you can see above the contours are not perfect, but it comes down to how

    a lot of time, you have to spend.

    Then, you convert the path to a selection. In Photoshop, go to select change smooth and use smoothing 2px

    in an attempt to get out of the irregular bumps or the strangeness of the track.

    Create a transparent layer and fill the section "" with black.

    With the layer selected, go to export as and select SVG and you will get a SVG file. I don't know if

    It works with the Glyphter, but I downloaded what I've done here, so you can try it for yourself.

    Checkin.svg - box

    Hope this works for you

    Terri

  • HELP: How to create the link via text boxes

    I am trying to create a text through the comments toolbar box and set a link to a page in the same pdf. Using the Connector tool does not show an option to create a link to a text box or in the text created through the typewriter tool. I'm using Acrobat 9 Pro. Thank you

    An action to go to another page in the document can be attached only to a form or a link object field. When you add text using the typewriter tool that you add an annotation, which cannot do.

  • entry of boilerplate text to create the new output text

    Hi Im trying to use a clip with four input textfields nested inside the textfield of entry (name of the customer, the delivery, the telephone number, address), after a user presses save button, I want to save the text to my textfields of output (customer name, delivery, phone number, address). but whenever I press save button it replaces the textfield output box. Im trying to create a new textfield output whenever a user enters information in the input textfield and list this info ten to a page... help or direction is appreciated!

    I see you still have the nexted writeText function in another function.  That out of there and give him the same level of access as the function dispar.

    I think I begin to understand what you're trying to do.  What you need to do is to make the object you are targeting only be the last tbox object that you added.  To do this, you should have a variable outside the functions (private var newText:tbox ;) that you assign only to the most recent created tbox because it gets created... (replace the line in the function using just: newText = new tbox() ;))  Then in the writeText function target you using this variable as you.  That should be only the most recent you tbox Add.

    In addition, if you only have a ps1 textfields game you only need to assign event listeners to them once.  If I understand what you are doing, your current code reallocates the listeners whenever you create a new tbox.  If this is the case, find also assigned outside the service dispar

  • Frames anchored for images will remain not as place

    Hello

    I am just placing of reinforcement anchored for images in my documents using the pod of roame anchoreed. However, executives will not remain as after I have save and close the document and open it again. I used the slot option current after selecting line sink it in the paragraph. Seems odd, but the way I want it to work. Any ideas on how to improve this? I want executives to pierce the width of the block of text document and place the nearest inside of the link image.

    I use fm 9.

    Thank youClipboard01.jpg

    Pieter,

    The anchored frame is not behind the text. It's cropped, which I believe is the default when creating an anchored frame or a chart is important.

    In the properties of the anchored frame, clear (clear) Cropped and change the alignment to the left or right, instead of Center. You can also clear the floating box. These selections should still be there once you save and open the document.

    Maybe you were using another way (I don't know what) to change the position of the frame anchored without also clearing these check boxes. But that's just a guess. Try the above and see if it works.

    Van

  • Deleting all the blocks of text hidden unexpectedly removes blocks of text embedded (but visible). Why?

    I try to use the code below to remove all the blocks of text hidden in a document. It is works quite well, BUT for some reason, removes the visible anchor text blocks.

    (the argument currentTextFrame.length is to prevent it remove hidden text blocks if the content is threaded, in which case the text is redéroule then in blocks of text that is visible.) I need to find a solution to this, but it's tomorrow problem.)

    I have a similar function to allGraphics and does not remove the anchored frames.

    Can someone point me in the right direction? I can add a check to see if the text block is anchored, but I fear that I might get bored the biggest problem.

    var myDocument = app.activeDocument;
    var myTextFrames = myDocument.stories.everyItem().textContainers.reverse();
    var myTextFramesLength = myTextFrames.length;
    for ( i = 0; i < myTextFramesLength; i++ ){
         var currentTextFrame = myTextFrames[i];
         if ((!currentTextFrame.visable) && (currentTextFrame.length ===1)){
              currentTextFrame[0].remove();
         }
    }
    
    

    _9781101983546_EPUB_SBs_indd___100_.png

    Edit: What is happening in 2014.0 and 2015.1, OS x 10.10 CC

    Post edited by: Naomi Kennedy

    Hi Naomi,

    and there is an array of arrays with:

    myDocument.stories.everyItem().textContainers
    

    Try this:

    var a = app.documents[0].stories.everyItem().textContainers;
    for(var n=0;n
    

    I suggest the following, which should work:

    var doc = app.documents[0];
    var myStoriesArray = doc.stories.everyItem().getElements();
    var storiesLength = myStoriesArray.length;
    
    var textContainersToRemoveIDs = [];
    
    for(var n=0;n
    

    Uwe

  • Overset text when you create a block of text to another object

    I apologize if this has been answered in other discussions, but the search function does not work now. I am trying to create a block of text on top a .pdf bound. I can create the block of text, but as soon as I enter the text, I get the text marker in excess on the frame, despite the fact that the frame is big enough to accommodate the text that I entered. This happens if I simply enter a single period.

    If I click on "mount the frame to the content" he develops vertically the text block until it is large enough to have a part that leaves at the edge of the linked .pdf below, and the text that I entered appears here. Of course, now, I have a block of text that is 20 times bigger that I need, and I still have no text in the position where it is needed.

    Here is a link to a screenshot:

    http://Tinypic.com/r/i3vqjs/7

    I'm still a newb on InDesign, and I hope that there is an easy solution to embarassingly on this point I should have, but any help is appreciated.

    Thank you

    You probably dressing applied on the structure with the PDF file. Either remove it, or open the options of text block for your frame on top and check the box to ignore the dressing.

  • Create text online the content of a xml tag frame?

    Hello! I have a pretty big document created from an XML file, and I would like to convert a series of my XML tags to the anchor text blocks, so I can hang them on the left edge of the lines they appear in.

    My XML file is converted into a

    > root

    > Chapter

    > para

    > id

    1

    > verse

    text

    > id

    > verse

    etc... See extract file here http://1drv.ms/1dX6lYO

    So far, I have the following, which gets me an array containing all the elements ID.

    var myDocument = app.activeDocument;
    var myXMLidElement = myDocument.xmlElements.itemByName("book").xmlElements.itemByName("c").xmlElements.itemByName("p").xmlElements.itemByName("id");
    var myXMLidText= (myXMLidElement.contents);
    var myXMLidLength = myXMLidText.length;
    for (var i = 0; i < myXMLidLength; i++) {  //loop to go through
        //alert (myXMLidText[i]);
        myDocument.select(myXMLidText[0]);  //this gives me an error saying expected data type needs to be array. Can someone explain? Where do I find info on the select command?
        myDocument.selection[0].insertionPoints[0].textFrames.add(myXMLidText[0]); //haven't managed to get to this line yet, but I want it to create an inline text frame at the point of the selected text and set the frame's contents to be my XML Id Text
    

    I guess I want and then delete all the text in my id too, but that's not important.

    Some other random excerpts, I could use?

    myInlineFrame.contents = "myXMLidText";
    

    Guidance on the creation of the inline frames and the logic of loop? I'm an old hand with InDesign, but new to scripting, so be gentle.

    Try this,

    var myDocument = app.activeDocument;
    var root = myDocument.xmlElements[0];
    var myXMLidElement = root.evaluateXPathExpression("//book/c/p/id");
    for (var i = 0; i < myXMLidElement.length; i++)
    {
        myDocument.select(myXMLidElement[i]);
        var myTextframe = myXMLidElement[i].placeIntoInlineFrame(["1p","1p"]);
    }
    
  • How to create link for reference to the paragraphs or text anchor to another indesign file?

    Hello

    I'm new in indesign scripting.

    I want to create the reference, which is the link to the paragraphs (or text anchor) another indesign file (new.indd).

    My first problem is how to get all the paragraphs or anchor text of the file new.indd

    I have a TextFrame whose content is Adobe Indesign.

    I want to apply an Adobe Indesign link reference to the paragraphs with the Destination Documents: new.indd.

    How it's done by script?

    I have try to use this:

    indesign #target

    myDocument var = app.documents.add ();

    var myTextFrame = myDocument.pages.item (0).textFrames.add ();

    myTextFrame.geometricBounds is ['10', 15 ' p', '30', '35p'];.

    myTextFrame.contents = "Adobe Indesign";

    var text = myTextFrame.texts.firstItem ();

    var hyperlinkURLDestination = myDocument.hyperlinkURLDestinations.add ("C/Documents and Settings/Administrator/Desktop/new.indd");

    var DestinationDoc = hyperlinkURLDestination.parent ();

    var xRefForm = myDocument.crossReferenceFormats.item ("Page number");

    source var = myDocument.crossReferenceSources.add (text, xRefForm);

    var myLink = myDocument.hyperlinks.add (source, hyperlinkURLDestination);

    When I run this script it gives error "the destination is not valid. You can create Cross - reference to anchor text or destination of the paragraph.

    How to get all the Paragrapgs or text the file new.indd anchor and create cross-references using the this.

    Thank you.

    You can create cross-references to anchor points and paragraphs. If you need create an anchor text in new.indd, then use as the target of the cross reference:

    var anchor = app.documents.item ('new.indd').hyperlinkTextDestinations.item ('myAnchor');

    source var = app.activeDocument.crossReferenceSources.add (text, xRefForm);

    app.activeDocument.hyperlinks.add (source, anchor);

    Peter

  • Is it possible to place the table and the text online?

    Hi all

    I have a table need to align with the numbered list. Is it possible in line of the table and text on a single line. EX: 6.12 and top of the 'text' must align horizontally.

    See the screenshot of the problem.

    Currently what I do, it is to place the table in separate frame and place it online using the option of the anchor.

    Screen Shot 2016-08-30 at 1.20.22 PM.png

    Thanks in advance.

    Kasi

    We could use the options for text blocks to position the first line.
    Fixed value set to 0.

    And a table style that would govern the distance before and after a table.
    If you wish, set both values to 0 .

    We could also do a minimum in the lead with the paragraph formatting to separate paragraph following with the next table.

    Best,
    Uwe

  • FM7.2: Problems with frame anchored in the rotated table cell

    Hello O Experts,

    I am facing a nasty problem with FrameMaker 7.2 for Windows with frames embedded in rotated table cells. I was wondering if any of you have seen this problem and know how to solve.

    The problem is reproduced as follows:

    1 create a table.

    2. Add a small frame anchored "the point insertion" inside one of the cells.

    3. Add a line of text to the anchored frame.

    4 turn the cell by 90 degrees clockwise or counterclockwise.

    Up to step 3, the anchored frame and the line of text behave as expected. Can I choose both the frame and the text line, move and resize. In all cases, they are displayed correctly.

    After step 4, the following occurs:

    • The content of the anchored image appear or is badly distorted.
    • Is no longer, I can select or resize the anchored frame (if I try, FM acts irregularly and wildly moves the outline around the page).
    • I can choose is no longer the line of text in the frame.

    I enclose a file FM (created using integrated model "portrait" of FM) sample that illustrates the problem.

    If someone knows this problem and I hope a solution, I would greatly appreciate it if you'd share. Thank you very much!

    Michael,

    If you turn just the anchored frame itself and not the cell (content) then everything behaves. If you have lots of content for the anchored frame, then place a block of text in the anchored frame, use a suitable paratag in text and only turn the framework anchored (all content will follow along then).

  • Anchor text does not appear in the Panel "new hyperlink.

    I make an interactive PDF where I did text anchors to headings throughout the document. But when I try to create my shortcuts by plasing a hyperlink to them, the 'anchor text' field is empty.

    Skjermbilde 2016-07-13 kl. 12.51.47.pngSkjermbilde 2016-07-13 kl. 12.53.02.png

    The obvious errors?

    Make sure you create the anchor text in the hyperlink Panel > new hyperlink destination > type: anchor text

Maybe you are looking for

  • Computer laptop fan does not properly

    I have a hp laptop g62-457dx and when I turn it on, it states the fan is not working properly, then stops after 15 seconds or continuous Windows if you press on enter.  I cleaned all the wind to blow air and get always the same message when I turn on

  • print the model 4630 printer stops after printing some of the jobs

    I have a printer HP 4630 and not ok to print jobs print 1 or 2, but will not display a larger print job with stop. Help

  • Fedora 7 is not installing on hp 630 i3 2nd GEN is compatible or try the new version

    I have HP 630 with intel i3 2nd GEN, 2 GB of RAM (I just bought a month ago). I tried to install fedora 7 on my lapi but sound complete the installation but not opening not due to graphics compatibility and only a black screen opens on startup with a

  • Contact.NICKNAME bug

    I can't add or Pseudo values in any BB device. All other attributes adds good. What evil? ContList contact list Contact contact ..... NICKNAME {If (card.getNickName ()! = null & {contList.isSupportedField (Contact.NICKNAME))} If (contact.countValues

  • BlackBerry smartphone Blackberry Bold 9900 does not load!

    I've had my "BOLD" for 8 months now, last month my phone would not temporarily load, but today that it won't load at all, I had a new battery about two months ago, it was great at first, but then lost power later, the. Owen I connect my charger, the