Place inline graphic?

Hi all,
I have ExtendScript code that places a graphic inline in a text frame. It does this by placing the graphic on the page, selecting it, cutting it, then selecting some placeholder text in the text frame, and pasting. This replaces the placeholder text with the graphic.
This might not be the most elegant way to do this, but it's been working fine.
Problem: now I need to move this code to InDesign Server. InDesign Server lacks select, copy, and paste methods (since there's no UI).
I've been trying to find an alternate way of doing this without success. I don't have the option to import the text stream as XML.
Any suggestions?
Thanks,
Chuck

I forgot to mention: in many cases, the "graphic" that must be placed is a snippet. NOW is it complicated enough for you?
-Chuck

Similar Messages

  • How can we place an image in already created inline graphic frame?

    Hi,
    AIM::
    To place an image in the inline graphic frame.
    OBSERVATION::
    As i have analysed the snippet Runner,i came to know that it allows to load the placegun with the file(in my case image). but in order to place it,we need to click on the document..and then the image is placed at (0,0) of the page(I suppose Indesign does it automatically).
    what is needed,is to place image in already created inline graphic frame. i have created a inline graphic frame at some position in the story,but now i required to place image in this created frame.

    I have the same problem. Can you give me a short code sample for that.
    I have an image and want to place it in the currently selected frame...

  • Finding File Name And Using It To Place The Graphic Using VBscript

    I'm trying to find a file name (example, <place:E:\logo.tif>) in each text frame if it's there, then remove the text from the frame and then place the file in the frame. This is to get around the feature missing from InDesign that is in PageMaker that allowed you to import inline graphics using tagged text. Below is what I have come up with so far. The file name is currently hard coded in the example below.
    Thanks,
    Archie
    For I = 1 to cInt(myMountNumber)
    Set myTextFrames = myDocument.TextFrames
    Set myCurrentFrame = myTextFrames.Item(I)
    If myCurrentFrame.Texts.ItemByRange (1,7).Contents = "<Place:" Then
    Set myLastCharacter = myCurrentFrame.Characters.Item(-2)
    myCurrentFrame.Texts.ItemByRange (1,myLastCharacter).Item(1).Contents = ""
    myCurrentFrame.InsertionPoints.Item(1).Place ("E:\sxs\pm65\Sundco.jpg")
    myCurrentFrame.Fit idFitOptions.idProportionally
    End If
    Next

    ' For I = 1 to cInt(myMountNumber)<br />For I = 1 to myDoc.TextFrames.Counts<br />' I think your myMountNumber is equal to TextFramesCount<br /><br />' Set myTextFrames = myDocument.TextFrames<br />' Set myCurrentFrame = myTextFrames.Item(I)<br />' you don't need to get reference to ALL TextFrames in EACH iteration<br /><br />Set myCurrentFrame = myDocument.TextFrames.Item(I)<br />' get reference to Ith TextFrame in document<br /><br />' If myCurrentFrame.Texts.ItemByRange (1,7).Contents = "<Place:" Then<br />If left(myCurrentFrame.Texts.Item(1).Contents,7) = "<Place:" Then<br />' looks better and should be faster<br /><br />   ' Set myLastCharacter = myCurrentFrame.Characters.Item(-2)<br />   ' myCurrentFrame.Texts.ItemByRange (1,myLastCharacter).Item(1).Contents = ""<br />   ' you don't need these lines - you will delete contents in PLACE line<br />   <br />   ' myCurrentFrame.InsertionPoints.Item(1).Place ("E:\sxs\pm65\Sundco.jpg")<br /><br />   myFile = Mid(myCurrentFrame.Texts.Item(1),8)<br />   ' get all after "<Place:"<br /><br />   myFile = Split(myFile,">")(0) ' get all to ">"<br />   ' small trick ;) when split - get array - but we can use (0) to refere to first element<br /><br />   myCurrentFrame.Texts.Item(1).Place(myFile)<br />   myCurrentFrame.Fit idFitOptions.idProportionally<br />End If<br /><br />Next<br /><br />and I don't think that iterating TextFrames collection is good way ...<br />you should iterate Stories collection and refer to first TextFrame - unles you are sure what you are doing ;) and you have Stories where each TextFrame will have image inside ...<br /><br />robin<br /><br />-- <br />www.adobescripts.com

  • Bullets as inline graphic

    I am trying to use an inline graphic as a bullet but I need
    to be able to change the colour. Is it possible to do this or is
    there another way to place a bullet and have it able to be altered
    when needed.

    > I am trying to use an inline graphic as a bullet but I
    need to be able to
    > change the colour.
    If you use a symbol as the graphic, you can edit the symbol
    and all of the
    bullets will change color.
    Judy Arndt

  • Is it possible to replace  XSLT mapping in place of Graphical mapping

    Is it possible to do XSLT mapping in place of Graphical mapping, in any normal scenario?
    Means the fuctionality we do by using Graphical mapping(like the operations by using node functions etc...) could possible to do with XSLT Mapping?

    HI
    yes it is possible to replace the graphical mapping with the XSLT mapping.
    But using XSLTs degrade the performance of the interface and moreover they are not easily maintainable.
    Refer the below links for assistance on XSLT Mapping:
    XSLT MAPPING:
    Generic XSLT Mapping for SAP XI,Part I
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    Generic XSLT Mapping for SAP XI,Part II
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
    XSLT: Recursive Templates
    XSLT: Recursive Templates
    Easy RFC lookup from XSLT mappings using a Java helper class
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14
    Step u2013 By u2013 Step Simple Approach for XSLT Mapping
    Step – By – Step Simple Approach for XSLT Mapping
    http://www.devguru.com/Technologies/xslt/quickref/xslt_element_applytemplates.html
    XSLT Mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/01a57f0b-0501-0010-3ca9-d2ea3bb983c1
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/006aa890-0201-0010-1eb1-afc5cbae3f15
    xpath functions in xslt mapping
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=xslt+mapping&adv=false&sortby=cm_rnd_rankvalue#
    Using XSLT mapping in a ccBPM scenario
    File to Multiple IDocs (XSLT Mapping)
    Comparsion of Different mappings:
    Comparing Performance of Mapping Programs
    Complete mapping guide url:
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    cheers

  • TCS2 Inline graphics hidden by conditional text cause unwanted carriage returns

    I have some FrameMaker documents where there are some small icons in the text.  Their anchored frames are set to be "at insertion point" in FrameMaker. They work fine normally, but when the icons are hidden by conditional text, they cause unwanted carriage returns in the RoboHelp output. The text is split into different paragraphs in the middle of the sentence.
    For example, this is the FrameMaker input:
    And this is the RoboHelp (WebHelp) output:
    I notice that if I manually edit a topic in the RoboHelp editor, I can manually apply a conditional tag to an inline graphic without causing a line break.
    So, I'm wondering if there's a way to avoid this when using linked FrameMaker documents.
    Thanks,
       Philip.

    Your logs are generated automatically by your system as it runs - there is nothing further that you need to do. They are ordinary text files, so you can display them on a terminal using any of the usual tools - cat, less, grep, etc.

  • Adding a doubleclick event on Inline Graphic Image

    Hello all,
    I'm trying to add a doubleClickEvent to an
    InlineGraphicElement, so that a popup window appears, and I can
    enter a new width and height. I'm having trouble adding a listener
    for the doubleClick event to an image that I'm about to add as an
    Inline Graphic Element. 1. Before or after I'm inserting the image
    with insertInlineGraphic(source,width,height), how can I add a
    double click event listener? 2. Once I get a doubleclick mouse
    event working, how again can I access the selected or doubleclicked
    image so I can modify width and height attributes?
    Thanks so much for the help!
    Justin

    Thanks so much for the reply on this. I finally figured out
    what you meant. I managed to capture double clicks in the canvas
    but the canvas won't register events on inline graphic elements
    (they seem to be blocking the canvas), and in addition I can't
    access the eventmirror, so I can't add a listener directly to an
    inline graphic element. So I'm not quite sure what the best way to
    handle this is.
    Justin

  • How do I place two graphics side by side.

    We are using a one column with a side head. (Not that that should matter I guess.) How would I place two graphics side by side, still numbering the figures correctly. We have tried several things and finallly got them even, but it is a big hassel and then the paragraph style (Figure XX) doesn't always line up either. When I use the text frame tool to number the Figures, the numbering doesn't continue as it should. Seems that sometimes it works, but sometimes it doesn't.
    Thanks,
    ls

    If it was me, I'd set up a two-column, two-row table and set the ruling to none.
    Import the graphic into cell 1/1 so that an anchored frame is created automatically.
    Shrink-wrap the graphic. Repeat for cell 2/1.
    Then I'd put the Figure caption tag into the second row of cells, under the graphics.
    *Ordinarily, you wouldn't use the text frame tool for stuff like this, nor the Text Line tool, which is what you may be using.
    If stuff isn't set up properly, it creates a text flow that's separate from your main text flow, which means the auto-numbering counters are in two separate flows -- the reason they're not incrementing for you.
    Art

  • [CS2/CS3] - Browsing all inline graphical objects

    Hello,     I have a text frame, where are placed inline graphical objects (square, circle, ...) and I want to browse all these objects.<br/><br/>
    Sample:
    I have valid UIDRef to entire text frame, but when I use this code:
    InterfacePtr<IHierarchy> hierarchy(textFrameUIDRef, UseDefaultIID());
    int32 childCount = hierarchy->GetChildCount();
    value of childCount == 1, when I use recursive call to get child I am given also value "1" and this node has no children.
    Thank you for your help !

    Thank you for your answers,
       I followed your advices and I browsed code from "CodeSnippet", where is an access to get OwnedItemStrands.
    According the attached snapshot from Programming Guide (p. 375), I am able to get kSplineItemBoss, that is fine, but I need to skip from Text fundamentals to Graphical fundamentals. I need to be able to catch ISpread interface of graphical objects?
    Thank you, marxin

  • Selecting text under inline graphic

    I need to edit text under an inline graphic. I am not able to select / edit the text.
    I've tried to "send to back" (the graphic), but it still says above the text.
    I'm doing this in order to get round corners around a table.
    If you know how to drill down and select the text, I would be much obliged.
    I'm using CS4 ME version.
    Thanks for any and all assistance.

    There is no layering with an in-line graphic (what InDesign now calls Anchored Object). The object is inserted in the text flow, and since text flows as it is entered, an in-line object will be cover text that is before it in the flow (ie. before the insertion point) and  text after the insertion point will be superimposed on top of it. That doesn't mean that you can directly select that text that appears to be "on top" of the object though. To select that text you will need to position your cursor in text that is not covered by the graphic and use the arrow keys to navigate to the point in the text that you want to edit. (alternately you could just use find/change).
    You should still post a screen shot of what you're doing because there may be more to it than this. For instance, if your in-line graphic is a table that is already in a text frame as opposed to simply inserted into the text, you could be unnecessarily complicating things.

  • I need to edit an inline graphic

    I have some small graphic ICONs that are placed next to (Left of) some paragraphs of text.  Since these ICONs need to move up and down with the text I was moving them manually whenever I edited a paragraph.  Then someone showed me how I could select them.  Cut them to the pasteboard.  Then paste them as the first character in the paragraph and edit the attributes such that they appeared to the left of the paragraph but then whenever I edited the text, these icons would move up and down with it.
    O.K.  So now I have a paragraph that has two ICONS next to it.  The customer has requested that I swap their positions.  I only have ONE inline graphic ICON showing in the story editor because when I placed these I cut them both to the pasteboard and then pasted them as an inline graphic into the story.
    My question is:  Do I have to delete the inline graphic.  Go and get both ICONs again from my library of artwork and put them on the art in the transposed order and then cut them again to the pasteboard and re-paste into my story?  If so then I am not a happy camper.  Is there a way to UNDO the conversion to an inline graphic and somehow get them back to the pasteboard where I can paste them as normal ICONs on the artwork.  Then make my changes and then re-cut them to the pasteboard and paste back into my text story?
    Anybody have any light they can shed on this?
    I'll probably do the first scenario for the jobs at hand but it seems a long way around.  Interested if there is a better way.  Thanks!
    Randy

    It sounds like you had the icons grouped when you pasted them into the story so they are a single anchored object. Use the selection tool (black arrow) and click on the icons. Cut. Paste. Ungroup. Now copy and paste each icon as a separate object into your story.

  • Post inline graphics into the text. How?

    Hello my friends!
    1. I want to know how can I post graphics into text like in this manual http://www.adobe.com/designcenter/indesign/articles/indcs2at_anchoredob.html
    What commands I should to use? Could you give me an example of code?
    2. Also, how can I make the text wrapped around the posted graphics?
    I use CS3.
    Thank you!

    From the Javascript CS3 examples "Text" -> "AnchoredFrame.jsx":
    //AnchoredFrame.jsx
    //An InDesign CS3 JavaScript
    //Shows how to create an anchored frame.
    main();
    function main(){
        mySetup();
        mySnippet();
    //Setup Help Text
    //Setup help text goes here.
    //end setup help text
    function mySetup(){
        var myDocument = app.documents.add();
        myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
        myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
        var myPage = myDocument.pages.item(0);
        var myTextFrame = myPage.textFrames.add({geometricBounds:myGetBounds(myDocument, myPage), contents:TextFrameContents.placeholderText});
        myTextFrame.texts.item(0).leftIndent = 72;
        function myGetBounds(myDocument, myPage){
        var myPageWidth = myDocument.documentPreferences.pageWidth;
        var myPageHeight = myDocument.documentPreferences.pageHeight
        if(myPage.side == PageSideOptions.leftHand){
            var myX2 = myPage.marginPreferences.left;
            var myX1 = myPage.marginPreferences.right;
        else{
            var myX1 = myPage.marginPreferences.left;
            var myX2 = myPage.marginPreferences.right;
        var myY1 = myPage.marginPreferences.top;
        var myX2 = myPageWidth - myX2;
        var myY2 = myPageHeight - myPage.marginPreferences.bottom;
        return [myY1, myX1, myY2, myX2];
    } //end setup
    //Snippet Help Text
    //Snippet help text goes here.
    //end snippet help text
    function mySnippet(){
        var myDocument = app.documents.item(0);
        var myPage = myDocument.pages.item(0);
        var myTextFrame = myPage.textFrames.item(0);
        var myInlineFrame = myTextFrame.paragraphs.item(0).insertionPoints.item(0).textFrames.add();
        //Recompose the text to make sure that getting the
        //geometric bounds of the inline graphic will work.
        myTextFrame.texts.item(0).recompose;
        //Get the geometric bounds of the inline frame.
        var myBounds = myInlineFrame.geometricBounds;
        //Set the width and height of the inline frame. In this example, we'll
        //make the frame 24 points tall by 72 points wide.
        myInlineFrame.geometricBounds = [myBounds[0], myBounds[1], myBounds[0]+24, myBounds[1]+72];
        myInlineFrame.contents = "This is an inline frame.";
        var myAnchoredFrame = myTextFrame.paragraphs.item(1).insertionPoints.item(0).textFrames.add();
        //Recompose the text to make sure that getting the
        //geometric bounds of the inline graphic will work.
        myTextFrame.texts.item(0).recompose;
        //Get the geometric bounds of the inline frame.
        var myBounds = myAnchoredFrame.geometricBounds;
        //Set the width and height of the inline frame. In this example, we'll
        //make the frame 24 points tall by 72 points wide.
        myAnchoredFrame.geometricBounds = [myBounds[0], myBounds[1], myBounds[0]+24, myBounds[1]+72];
        myAnchoredFrame.contents = "This is an anchored frame.";
        with(myAnchoredFrame.anchoredObjectSettings){
            anchoredPosition = AnchorPosition.anchored;
            anchorPoint = AnchorPoint.topLeftAnchor;
            horizontalReferencePoint = AnchoredRelativeTo.anchorLocation;
            horizontalAlignment = HorizontalAlignment.leftAlign;
            anchorXoffset = 72;
            verticalReferencePoint = VerticallyRelativeTo.lineBaseline;
            anchorYoffset = 24;
            anchorSpaceAbove = 24;
    } //end snippet

  • Can not place any graphic in Illustrator CS6

    I try to place a jpg or psd graphic inside a normal Illustrator document. Illustrator tells me the graph has no color profile (what is not correct - it has) but whatever option I choose nothing happens - no graphic is placed, I get no cursor to place the graphic. Or Illustrator just crashes. This used to work just fine in earlier version... I use CS6 cloud version.
    Any help greatly appreciated!
    Thanks.

    I tried several color settings, I checked with the color tool if profiles are damaged but the ones I use did were not listed, I removed the preference files... nothing. Either Illustrator is just crashing or it says for every file that it has no profile but then just nothing further is happening.
    The only way I found to get a picture into Illustrator is to place it within InDesign (that works normal) and then copy / paste it to Illustrator.
    Maybe this is a Mountain Lion problem? I can not remember having those problems on Lion.

  • Messages with Inline Graphics Locking Up Mail

    Yesterday everything was fine with Mail.  Today, any time I click on a message with inline graphics Mail freezes (rainbow cursor) and I have to force quit and come back.  The only way I've found to continue using mail is to avoid or quickly delete those messages.  The problem being, I need to forward one, and I can't forward it fast enough to avoid Mail freezing.
    I haven't seen anyone else with this issue (my third since upgrading, I must be lucky, I'm having problems no one else is!) so starting a new thread.

    One possible solution would be to organise your inbox into folders.
    Its never relly good on any system to have one folder that has everything in it.
    Try going to you web gui for that mail account and organise your folders and move mails from your inbox into corresponding folders for better organisation.
    Several folders containing the same amount of one folder will usually load a little quicker as the folder may not be accessed to download its content unless veiwed.
    So having 10 folders with organised content, and you inbox as an area thats to hold only new emails would work much much quicker with imap.
    Most imap servers will only update the contents of a folder when its veiwed.

  • Colour below paragraph text in inline graphic way

    Hellow,
    I am doing children story book in indesign cs5. Every story has  title, picture, story, questions and some other fun matter.
    Story flows in two and two and half pages. Below STORY MATTER ONLY we want to put colour which flows one frame to another or one page to another.
    I am doing full INLINE graphic i.e. every thing in one frame  flowing automatically if I reduce or add matter in between.
    Can it possible colour patch below story matter  adjusted atuomaticelly if matter reduced or added and flow from one frame to another.
    Can we define in paragraph style colour below paragraph.

    sadhale wrote:
    Dear Peter Spier
    Yes, I tried paragraph rule also. But It dosent work because if paragraph ends with one or two words, colour patch dosent stretch to right edge.
    Then colour dosent go little beyond matter.
    I can use Anchor object, but I need to adjust anchorde patch as per matter.
    You will get better idea from the image below
    Have you considered applying the background color as a filled rectangle on the master page, and creating the white separators around graphics, and activities items as anchored objects with white fill and/or borders?
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

Maybe you are looking for

  • Cannot start or uninstall iTunes

    Last night my power went off and caused me to have to do a system recovery on one of the users of my computer. While I was trying to figure out why the user's desktop was messed up I tried running Itunes. It said there was a new update so I went ahea

  • 3rd Party SATA raid cards for internal drives?

    All -- Apart from the discussion as to if RAID actually benefits a home desktop system, I am wondering if anyone has the lowdown on using 3rd party SATA raid cards to support the INTERNAL hard drives on the Mac Pro series? My Mac Pro is still slated

  • Completely erased my entire file when trying to convert

    I tried to convert an .rtf file this morning, it looked like it was working then when I tried to view it the file was completely blank. So I went back and tried to open the file in my wordpad and that also is now COMPLETLY BLANK. I'm kinda ticked off

  • Form should be print in english as well as arabic

    Hi, my question is i want to go with scripts, printing the script with english as well as arabic language, suppose if the address we are extracting in english in one side of form along with that i have to print the same address in arabic language on

  • Updating to IOS5 on the iPod

    Hi guys Its me again this time its to do with IOS5 for ipod as you may know if youve tried to update it says that there is some apps that are on your ipod and not o your Pc so i transfered them all and I got to the next step and that was it says it b