Center text to the left of the object

How to align the center of the text to the left of the object? Make the object the object 'key '? I want the object remain in place.

Use smart guides.

Tags: Illustrator

Similar Questions

  • Problem creating Cup by text on the object

    So I group of shapes that are each a different color a rectangle (took a rectangle and used the tool for scissors divide to recolor). Each color is its own form, but I put them all in a group if that makes since. Then I put the text above the form to make the cut through and it turned out all rectangle white? It broken, but got rid of the gradient? Whats happening?

    Action taken:

    Click with the right button on text

    Vectorize

    Select the object and the text

    Click on exclude to scout

    Thanks, Tommy

    You want an Opacitiy mask.

    Make the text in black on top the glomeruli color objects.

    Select both and choos make mask in the transparency Panel.

    Uncheck the Clip and invert the mask.

  • Formatted text in the text field by default

    I would have a default text in a text field and do it on 3 separate lines in the text box. Is this possible?

    Hello

    You can create a text of several default rows to a manipulation of the value in the XML source.

    1. you select text field and enter your default text in the object palette

    2. do XML source and locate the line that contains your default text

    It's my default text

    3. Enter code throughout the text, where a line break to appear.

    This
    is
    my
    by default
    text

    The text field displays now, even it is not configured to display several lines.

    This

    is

    my

    by default

    text

  • take the text to the center of the object

    Hello everyone.

    I have a task to create the text in the center of any object.

    For example I have simple object

    Screenshot_2.png

    After using my script, we can see effect like that

    Screenshot_6.png

    I use new areaText for her creation.

    BUT I can't use areaText if we have a hole inside the object.

    Screenshot_3.png

    because illustrator think its two different object and the text to take into the hole (2 times: for the buoy red and white circle),

    So I need to keep red donut text...

    Screenshot_7.png

    How can I do?

    Hi chudomozg,

    your 'donut' is a compound path (with 2 pathItems).

    Maybe it's a bit more useful for you:

    // CompoundPath_WidthOfElements.jsx
    // required: open document with one selected compound path e.g. a "donut"
    
    var aDoc = app.activeDocument;
    
    var sel = aDoc.selection;
    if (sel[0].typename == 'CompoundPathItem') {
        alert(sel[0].pathItems.length);
        alert(sel[0].pathItems[0].visibleBounds[2] - sel[0].pathItems[0].visibleBounds[0]); // width in Points
        alert(sel[0].pathItems[1].visibleBounds[2] - sel[0].pathItems[1].visibleBounds[0]);
        }
    

    Have fun

  • Text aligns the Center instead of the left, but only on Windows 7 computers.

    I designed a website on a Mac in CS5. It works fine on the Mac and the PC running XP/Vista, but there are problems on Windows 7.

    For some reason text boxes that I have aligned left work very well as indicated above, but each text box aligns the Center on PC under Windows 7.

    Can anyone offer advice please? I'm pretty new to this by the way!

    Thank you very much!

    Hello

    You have no text align the rule in your css I can see if the browser is probably using its default value, or who inherit from the rule, place a -.

    text-align: center;

    Edit: should read-

    text-align: left;

    in your css as required, (try in the content text rule) also if you can try to avoid using "-", (dashes) or other items on your behalf.

    PZ

    Post edited by: pziecina

  • How to center text compared to the other two layers

    Hello world

    It seems simple enough: I have two layers of distinct text - both in the same line. One is left-aligned, the other is aligned to the right, so that they specify in the middle. Overall, I want they to be centered.

    Example.PNG

    But because these two texts will have different formulations of various projects, I want to use the model function, so I can edit them in first.

    Is there a way to tell After Effects: "some text there, take two text layers and their Center as a whole."?

    For the life of me I can't figure out how to do. The closest I am to a solution is an expression on the anchor to a null object, which reads:

    W1 = thisComp.layer("Text1").sourceRectAtTime () .width;

    W2 = thisComp.layer("Text2").sourceRectAtTime () .width;

    [(thisComp.width-(w1 + w2)) / 2, value [1]]

    Then the text layers are related to the null value.

    I found this in a post on Creative Cow: multiple text layers to form one. how I can it Center as a whole?: Adobe after effects Expressions

    The problem with that: it works with the text aligned to the right. If you change the text aligned to the left, everything goes to the left.

    Does anyone have an idea how to make this work? It may even be a way simpler than using expressions?

    I hope I could explain the problem. If there's anything missing please let me know.

    Thank you!

    Concerning

    FABI

    There is no demo that is involved in the technique. Alignment tools will not work with a demo. In the screenshot at the top of the page, note the selected text and the reference level setting in the character Panel. I just adjusted the base line in the second paragraph of the text to move it to the top so that it is aligned with the base line in the first paragraph of the text.

    Unfortunately, the process becomes a little more difficult if you want to be able to use this model as an asset of editable text dynamically linked in Premiere Pro. Centering becomes a problem. It's pretty easy to get the width of the text layer but the anchor is based on paragraph and I'm not in any way take the width of the first paragraph of the text and add it to the width of the second paragraph of the text and adjust the anchor point to be at the center of the paragraphs combined.

    You can return to the idea of two layers of text, but use the width of each layer and the ratio between the widths to control the position of a null value. If you then related the two layers for the null value, the null value of centering with an expression based on the width of two layers and the ratio between the width of the left and right text would do the trick. I have to think about how to write this expression a bit. This is probably the solution to your problem, but I don't think I could write this expression in my head.

    What you want to do is to calculate the total width of the two layers (tw) and then calculate the ratio between the width of the two layers (rw / lw) then multiply the width of the layer left by the ratio then you can calculate the offset. You may have to calculate the ratio of the layer from left to the total width of the two layers. As I said, I'll have to think for a minute. There is also the problem of the space between the two layers. You will need to add a space before the first letter of the right text layer, but the size of the right layer won't take into account the space so you have to measure it and add it to keep things perfectly centered.

    EDIT:

    So I did a reflection more and I was doing it too hard. All you have to do is to calculate the difference between the width of the layers both text and divide by 2 and add it to the Center comp. name your layers of text left and right, and then add this expression to a null value.

    r = thisComp.layer ("right Text") .sourceRectAtTime (time, false);

    R.width = RT;

    l = thisComp.layer ("left Text") .sourceRectAtTime (time, false);

    lt = l.width;

    CC = thisComp.width/2;

    DIF = (lt - rt) / 2;

    [dif + cc, value [1]]

    Now, hold down the SHIFT key and parent the two lines of text to null. If you don't want to use the trick of null, you can add the expression of two layers of text. Using the value null makes it easier to move. The expression can also be modified to allow you to position the null or layers wherever you want in the model.

  • Center the text and the image beside.

    Hi, I managed to Center two pictures side by side very well with my old Web site page, but once I changed one of the images in text I can't line up side by side.

    Old (image next to the image):

    http://dkphotos.NET/about/about.html

    New (text next to the image):

    http://dkphotos.NET/AboutNew/about.html

    Any help would be much appreciated.

    HTML:

    <! doctype html >

    < html >

    < head >

    < link rel = "shortcut icon" href = "favicon.ico" > "

    "< link rel ="icon"type =" image/gif"href ="... /... "/ animated_favicon1.gif" >

    < title > on < /title >

    < meta charset = "UTF-8" >

    < link rel = "stylesheet" type = "text/css" href = "layout.css" >

    <! - latest jQuery core library - >

    " < script src =" http://code.jQuery.com/jQuery-latest.min.js ">

    < /script >

    "< script type =" text/javascript"src="//code.jquery.com/jquery-latest.js "> < / script >

    "< script type =" text/javascript"src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js "> < / script >

    "< script src="js/jquery-1.7.2.min.js "> < / script >

    < style type = "text/css" >

    < style >

    body, td, th {}

    do-family: "josefin-slab";

    make-style: normal;

    Police-weight: 400;

    font size: 15px;

    color: #444444;

    }

    / * LINKS * /.

    a {}

    do-family: 'slab of Josefin;

    font size: 15px;

    Police-weight: 400;

    text-decoration: none;

    Color: #777777;

    }

    a: link {}

    color: #444444;

    make-style: normal;

    Police-weight: 400;

    Police-family: josefin-slab;

    font size: 15px;

    }

    a: visited {color: #444444 ;}}

    a: hover {color: #60baec ;}}

    a: active {}

    color: #444444;

    make-style: normal;

    Police-weight: 400;

    Police-family: josefin-slab;

    font size: 15px;

    }

    a: focus {color: #60baec ;}}

    UL {}

    list-style: none;

    margin: 0;

    padding: 0;

    }

    Li {float: right; padding-right: 30px}

    body, td, th {}

    Police-family: josefin-slab;

    make-style: normal;

    Police-weight: 400;

    font size: 15px;

    color: #444444;

    }

    Abu

    {P1

    Police-family: josefin-slab;

    make-style: normal;

    Police-weight: 400;

    do-size: 18px;

    color: #444444;

    }

    {P2}

    Police-family: josefin-slab;

    make-style: normal;

    Police-weight: 400;

    do-size: 18px;

    color: #444444;

    }

    < / style >

    < script type = "text/javascript" >

    function MM_preloadImages() {//v3.0

    var d = document; If (d.images) {if(!d.MM_p) d.MM_p = new Array();

    var i, j is d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i <.) Length; i ++)

    If (a [i].indexOf("#")! = 0) {d.MM_p [j] = new Image; d.MM_p [j ++] .src = a [i] ;}}

    }

    function MM_swapImgRestore() //v3.0 {}

    var i, x = offline. MM_sr; for (i = 0; a & & I <.) Length & & (x = a [i]) & & x.oSrc; i ++) x.src = x.oSrc;

    }

    function MM_findObj (n, d) {//v4.01

    var p, i, x;  if(!d) d = document; If ((p = n.IndexOf ("?")) > 0 & & parent.frames.length) {}

    d = parent.frames [n.Substring(p+1)] .document; n = n.Substring (0, p) ;}

    If (!) () x = d [n]) & & copyrights) x = d.all [n]; for (i = 0;! x & & i < d.forms.length; i ++) x = d.forms [i] [n];

    for (i = 0;! x & & d.layers & & I < d.layers.length; i ++) x = MM_findObj (n, d.layers [i] .document);

    If (! x & & d.getElementById) x = d.getElementById (n); Return x;

    }

    function MM_swapImage() {//v3.0

    var i, j = 0, x, a = MM_swapImage.arguments; document. MM_sr = new Array; for (i = 0; i <(a.length-2); I += 3).

    If ((x = MM_findObj (a [i]))! = null) {document. MM_sr [j ++] = x; if(!x.oSrc) x.oSrc = x.src; x.SRC = a [i + 2] ;}

    }

    < /script >

    <!-the following script tag downloads a font of Adobe Edge Web server fonts to use in the web page. We recommend that you do not modify it.-->

    < script > var __adobewebfontsappname__ = "dreamweaver" < /script >

    " < script src =" http://use.edgefonts.NET/Josefin-slab:N1, N4:default.js "type =" text/javascript"> < / script > "

    < / head >

    < body >

    < div class = "wrapOverall" >

    < div class = 'container' id = 'headerContainer' >

    "" "< div class ="header"> < a href ="... / Home/Home.html "> < img src =" images/Home - Page_03.png"width ="448"height ="69"class ="logo"id ="Logo"onMouseOver =" MM_swapImage ("Logo","' images/home_03-roll - over.png', 1) ' Mm_swapimgrestore" alt = "Dovydas Kaltanas" / > < /a > < / div >

    < div class = "navMain" >

    < div class = "navMain" >

    < ul class = "navBar".

    style = "width: 530px;" float: right; Police-weight: 400; Police-family: josefin-slab; make-style: normal; ">

    < li > < a href = "Contact.html" > CONTACT < /a > < /li > ""

    < li > < a href = "" > BLOG < /a > < /li >

    "< li > < a href ="... / About/About.html "> ON < /a > < /li >"

    < li > < a href = "" > PRICING < /a > < /li >

    "< li > < a href ="... / Portfolio/Portfolio.html "> PORTFOLIO < /a > < /li >"

    "< li > < a href ="... / Home/Home.html "> HOME < /a > < /li >"

    < /ul >

    < / div > <! - END navMain - >

    < / div > <! - logo END - >

    < / div > <!--END header-->

    <! - MAIN CONTENT - >

    < div id = "Container" >

    < div id = "leftAbout" >

    < p1 > text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text < / p1 >

    "< p2 > < br / > < a href ="... / CurriculumVitae.pdf "> Curriculum Vitae < /a > < / p2 >"

    < / div > < /p > < / div >

    < p > < / p >

    < p > < div id = "rightAbout" > < img src = "images/profile.jpg" width = "450" height = "736" > "

    < p > < / p >

    < / div >

    <! - END MAIN CONTENT - >

    < div id = "containerFooter" >

    < div id = "Box1" style = "font family: 'Josefin slab'" >

    < p > all content < span style = "do-size: 20px" > to </span > 2013 DKphotos < /p >

    < / div > <!--end Box1 - >

    < div id = "Box2" >

    < p > < script type = "text/javascript" >

    BeginOAWidget_Instance_2149022: #OAWidget

    var urlToLike = ' http://www.facebook.com/DKphotos.net';

    If (urlToLike == ") {}

    urlToLike = window.location.href;

    }

    urlToLike = encodeURIComponent (urlToLike);

    var font = encodeURIComponent ('arial');

    document.write (' ' < iframe src = "http://www.facebook.com/widgets/like.php?locale=en_US & href = ' + urlToLike + ' & layout = button_cou nt & show_faces = false & width = 450 & height = 150 & action = like & font =" + police + & colorscheme = light"scrolling =" "frameborder ="0"allowTransparency ="true"style =" border: none; ") border-color: #ffffff; overflow: hidden; width: 450; height: 150 "(>< / iframe >') "

    EndOAWidget_Instance_2149022

    < /script >

    < / div > <! - END fbLike - >

    < / div > <!--end Box2 - >

    <! - float clearing - >

    < hr class = "compensation" / >

    < / div > <! - end container - >

    < / div > <! - END wrapOverall - >

    < / body >

    < / html >

    CSS:

    @charset "utf-8";

    / * CSS document * /.

    {body

    background - image: URL(images/bg_body.jpg);

    background-color: #ffffff;

    background-attachment: fixed;

    background-position: top;

    }

    {.wrapOverall}

    Width: 1920px;

    display: inline;

    }

    IMG {border: 0 ;}}

    {} ul.navBar

    margin: 0px 0px 18px 0px;

    padding: 0;

    white-space: nowrap;

    Width: 950px;

    Overflow-x: auto;

    Display: inline-block;

    }

    ul.navBar li {}

    Display: inline;

    }

    {img.logo .header

    float: left;

    margin: 0px 15px 0px 15px;

    }

    . Container {}

    min-width: 1050px.

    }

    #Container {}

    do-family: Verdana, Arial, Helvetica, without serif.

    border: 0;

    Width: 900px;

    Auto margin: 0; / * centered * /.

    overflow: hidden; / * float containment * /.

    }

    #Container {}

    Clear: both;

    Width: 100%;

    min-width: 900px;

    }

    #left {}

    Width: 300px;

    min-height: 550px;

    margin-bottom: 200px;

    border: 0;

    / * to reduce the float drop issues in IE * /.

    dressing: break-Word;

    left margin: auto;

    margin-right: auto;

    }

    {#ContentBox1}

    Width: 450px;

    min-height: 550px;

    margin-bottom: 200px;

    border: 0;

    / * to reduce the float drop issues in IE * /.

    dressing: break-Word;

    left margin: auto;

    margin-right: auto;

    }

    / * Clear floats after boxes * /.

    {.clearing}

    Clear: both;

    visibility: hidden;

    line-height: 0;

    font-size: 1px;

    Display: block;

    }

    {#containerFooter}

    Width: 100%;

    min-width: 650px;

    Max-width: 100%;

    color: #444444;

    make-style: normal;

    Police-weight: 400;

    Police-family: josefin-slab;

    font-size: 15px;

    text-decoration: none;

    }

    {#containerFooter}

    Police-family: josefin-slab;

    border: 0;

    Auto margin: 0; / * centered * /.

    overflow: hidden; / * float containment * /.

    }

    #Box1 {#Box2}

    Width: auto;

    min-height: 10px;

    border: 0;

    / * to reduce the float drop issues in IE * /.

    dressing: break-Word;

    }

    #Box1 {margin left: 8px; float: left ;}}

    #Box2 {margin left: 20px; float: left ;}}

    / * Clear floats after boxes * /.

    {.clearing}

    Clear: both;

    visibility: hidden;

    line-height: 0;

    font-size: 1px;

    Display: block;

    }

    {#containerFooter}

    Width: 100%;

    float: left;

    }

    {#containerFooter}

    position: fixed;

    low:-145px;

    z index: 500;

    background-color: #FFF;

    }

    Across the width of the site is 1920px? It is far too broad.

    anyway you can 'float' leftAbout and rightAbout containers if you want the text to the left of the image:

    {#headerContainer}

    overflow: hidden;

    }

    {#leftAbout}

    float: left;

    Width: 400 PX;

    }

    {#rightAbout}

    float: left;

    Width: 450px;

    }

    {#containerFooter}

    Clear: both;

    }

    I leave you to ajdust the width of the text container - leftAbout

  • Center the text in the TextField

    Is there a way to center the text in the text field? Especially vertically.

    Text in a TextField is centered vertically by default.
    You can change other charactistics of the alignment of the text in the TextField object through the setAlignment API.

    import javafx.application.Application; import javafx.geometry.Pos;
    import javafx.scene.Scene; import javafx.scene.control.TextField; import javafx.stage.Stage;
    
    public class TextFieldAlignment extends Application {
      public static void main(String[] args) { launch(args); }
      @Override public void start(Stage stage) {
        TextField text = new TextField("Centered."); text.setAlignment(Pos.CENTER);
        stage.setScene(new Scene(text, 200, 300));
        stage.show();
      }
    }
    

    Alignment TextField API is new to JavaFX 2.1 and not included in JavaFX 2.0, so use the last glimpse of JavaFX Developer:
    http://www.Oracle.com/technetwork/Java/JavaFX/downloads/devpreview-1429449.html

  • How to set the DataGrid header to center text?

    Hi all

    When the textAlign property value Center it's the alignment of the header text and the column to Center

    Is there a headerText to Center alignment and columns text align left.

    Thanks in advance

    KKC


    It does not work, and you don't need to implement a custom for this itemRenderer:


    DataGrid

    {
    headerStyleName:dataGridHeaderStyle;
    }

    .dataGridHeaderStyle

    {
    fontWeight: bold;
    textAlign:right;
    }
       

  • Align text to the left in the columns of the version CS3 ME

    Hello

    I use InDesign CS3 ME version. Usually, I create documents where the text is from right to left, but I would like to create a document in English now and when I create a column, I can put the text to left to right, which is ok, but the text in the right-hand column, moving to the left columns.

    How can I put it from the column "leftmost"?

    Thank you!

    Tom

    The direction of the column is determined by the direction of the story.

    There are three ways to determine the meaning of the story:

    (1) when you create a new image of text not threaded, if you use the

    regular text tool, it creates a story from left to right, and when you use

    the ME text tool, it creates a story from right to left.

    (2) to change the direction of the history of an existing account, you will need to

    Open the history panel and click on any "history of direction."

    button.

    (3) If you use object styles to your text frames, you can set

    history branch in the history of the object style options.

    Personally, I prefer to use a menu item, so I created one in my Multi-

    Multilingual tools... http://in-tools.com/plugin.php?p=26

    Substances

    http://www.in-tools.com

    Innovations in automation

  • The text of the e-mail under the column of the object does not match the selection

    When I get to my Inbox and select an e-mail to open the middle box and the text box below do not match the selection in the object column. This has occurred recently and only on my laptop. My office works fine. The central area and the text matching, this email has been deleted but the text won't just change and go. I'm going on a trip tomorrow, and if I can't fix this, I won't be able to open emails with possible solutions. I'll see answers but can't open them.

    right click on the folder, select Properties, and then on the button repair.

  • How do I do to convert the text of the String object to the Clipboard.

    Hi all, I am a beginner and I have a problem with the method of the Clipboard. I want to put a text string to the Clipboard, but the Clipboard.put method requires an object. What can I do to convert my text from the string object?

    My code below:

    String message = OriginalMessage.getBodyText();
    
                    String[] selections = {"Copy","Cancel"};                            Dialog addDialog = new Dialog("Copy to Clipboard", selections, null, 0, null);                           LabelField field = new LabelField(message);                addDialog.add(field);    
    
                if(addDialog.doModal() == 0) // User selected "Copy".            {
    
                    Clipboard cb = new Clipboard.put(message);
    
                }
    

    Please help me.

    A string is an object in Java.  You can simply call Clipboard.getClipBoard () .put (message);

  • In InDesign, manual kerning using text with Option + left/right just stopped working. The clues how to fix?

    In InDesign, manual using text with Option + left/right kerning. just stopped working. The clues how to fix?

    Hello Curry,

    I wanted to say thanks for trying to help figure this point. Believe it or not, it turns out that the culprit was the keyboard itself. Option key was fried. Go figure.

    Best,

    Kim urban

    Urban design

    [personal information deleted by Moderator]

  • How to wrap text around the anchored object (image)

    I quickly started to get account that I am not the mental giant I had previously thought!

    Having recently made the switch to InDesign, I fight to pick up some of the different methodologies, and more still, the different jargon.

    I read the section guide from Adobe on this request, and I feel none the wiser is. I'm sorry to you guys with what is probably a very trivial question for users over three years, but let's go even of evil.

    I am trying to anchor the image object in a block of text, with the image of the text wrapping. While it seems to be in my ability to insert the object and to wrap the text, I have real problems to anchor this object in the right place.

    What I'm trying to look like this: -.

    Screen Shot 2015-12-31 at 1.14.52 PM.png

    Can anyone please help me, a simple "idjit" way how to do this?

    Any help is greatly appreciated.

    See you soon... Scotty

    If the image is placed on the page:

    Drag the symbol at the top right in a paragraph before that the first line is ignored when the text is wrapped.

    I suggest to save all the settings (wrapping text, the position of an object of anchroed, etc.) in the Styles of an object as it makes it easier to do global settings later.

  • Release of anchor all the objects/text images

    Dear all,

    It's my 1st question on AC (Adobe Community), so I'll explain what I need here in details and excuse me my little or even none experienced in coding, especially in Javascript.

    I have a book with many INDD files, these files have a lot of images and objects and text blocks are anchored to the main text area.

    I searched on AC for the way to free him from all my anchored object and the main text block text block. so I found the average script.

    I found her name "ReleaseAnyAnchor" created by 'Dave Saunders' to release the anchored object (graphics, text, else) but one by one. and it will take too much time to free myself from all the objects on the book. (the Script code is below)

    //DESCRIPTION: Release Inline & Anchored Items
    //Written by Dave Saunders, released on indesignsecrets.com
    
    
    (function() {
      if (app.documents.length > 0 && // must be a document open
      app.selection.length == 1 && // selection must be of single item
      app.selection[0].parent instanceof Character) { // selection must be anchored
      if (parseFloat(app.version) < 6) {
      releaseMe(app.selection[0]);
      } else {
      app.doScript(releaseMe, undefined, app.selection[0], UndoModes.entireScript, "Release Any Anchor");
      }
      } else {
      alert("Please select an inline item.");
      }
    
    
      function releaseMe(myPI) {
      var yePage = findPage(myPI);
      var startBounds = myPI.geometricBounds;
      myPI.anchoredObjectSettings.anchoredPosition = AnchorPosition.anchored;
      myPI.anchoredObjectSettings.releaseAnchoredObject();
      if (yePage != null) {
      myPI.move(yePage);
      }
      myPI.move([startBounds[1], startBounds[0]]);
      }
    
    
      function findPage(theObj) {
      if (theObj.hasOwnProperty("baseline")) {
      theObj = theObj.parentTextFrames[0];
      }
      while (theObj != null) {
      if (theObj.hasOwnProperty("parentPage")) return theObj.parentPage;
      var whatIsIt = theObj.constructor;
      switch (whatIsIt) {
      case Page : return theObj;
      case Character : theObj = theObj.parentTextFrames[0]; break;
      case Cell : theObj = theObj.insertionPoints[0].parentTextFrames[0]; break;
      case Note : ; case Footnote : theObj = theObj.storyOffset; break;
      case Application : return null;
      }
      if (theObj == null) return null;
      theObj = theObj.parent;
      }
      return theObj
      } // end findPage
    
    
    }());
    


    also, I found another script which release all of the graphic objects, but not objects of text frame. (I get it from AC, but I remember exactly the place where.)


    if(app.documents.length!=0) {
        var ad = app.activeDocument;
        var pgit = ad.pageItems;
        var pgitlg = pgit.length;
        var objprocessed = 0;
        if(pgitlg !=0)
        {
            for(i=0; i<pgitlg; i++)
            {
                if(pgit[i].getElements()[0].constructor.name == "TextFrame")
                {
                    var tfg = pgit[i].allGraphics;
                    var tfglg = tfg.length;
                    for(j=0; j<tfglg; j++)
                    {
                        var rec = tfg[j].parent;
                        rec.anchoredObjectSettings.releaseAnchoredObject();
                    }
                }
            }
        }
    }
    


    all codes work well for me, but I need to try to merge or make a new code [as I mentioned that I don't have experiences in JS, so I do not know how to compile a new code that do the 2 steps of the 2 codes.]


    my request is, could you please help me to do this new code, or merge to compile a new code in the new file.


    I saw this topic releasing objects anchored and want to make a new script.


    Please try to help me as soon as POSSIBLE because I need this script to all my object anchored to begin working on the output file.


    I need the code works on any version of INDESIGN.


    Thanks guys, waiting for you.


    AMR

    AHA. If you need test whether a line is an anchor. If this is the case, use. releaseAnchoredObject(), if it is not, the simplest is to make an anchor, then release it:

    if (pageItems[i].parent instanceof Character) {
        if (pageItems[i].anchoredObjectSettings.anchoredPosition !== AnchorPosition.ANCHORED) {
            pageItems[i].anchoredObjectSettings.anchoredPosition = AnchorPosition.ANCHORED;
        }
        pageItems[i].anchoredObjectSettings.releaseAnchoredObject();
    }
    

    It works, but I don't know if the results are what you're after.

    Peter

Maybe you are looking for