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

Similar Messages

  • Why is the iPad inserting letters like vs and bs into the text of my emails? And how do I correctbthis frustration?   I did not put the b after the word correct.

    When I put text into something it inserts bs and vs intonthe text and other letters which I do not put in there.  I must constantly go back and fix what I wrote .  Please see the beginning of this...  I did not put the "n" into the text it just appeared there.  How do I fix this problem? Thank you

    This can happen if your other fingers accidentally touch the screen when you are typing. Check to see if you are doing this. "v", "b", and "n" on the keyboard are quite close to where your thumbs might be when you are typing.

  • Adjust height of Inline graphic against the baseline

    In CS2 I was adjusting the height of inline graphics on the baseline by calling:<br /><br />     InterfacePtr<IGeometry> geom(UIDRef(db, inlineUID), UseDefaultIID());<br />     if (geom->SetPathBoundingBox(newBBox, IGeometry::kResizeItemAndChildren) != kSuccess)<br /><br />This no longer works in CS3.<br /><br />I've also tried using:<br /><br />Utils<Facade::IGeometryFacade>()->SetItemsBounds(uids, Transform::CoordinateSpace::Parent(), Geometry::PathBounds(), rects);<br /><br />but that doesn't work either.<br /><br />Anyone know how to do this?<br /><br />Walter

    Can any one tell how to replace
    CS2 code
    PageItemUtils::SetItemBounds( iiItemGeometry, newBox, kTrue);
    for CS3 version during porting....

  • Letter-Spacing is different if I open my file at another Mac of us (Value is at both mac 0, but the text is longor), and if I cklick into the text-box, Illustrator says that the file was made in an other Version of Illustrator. We have on all macs the sam

    Letter-Spacing is different if I open my file at another Mac of us (Value is at both mac 0, but the text is longor), and if I cklick into the text-box, Illustrator says that the file was made in an other Version of Illustrator. We have on all macs the same system, os 10.8.3, cs6 and UTC4. And of course we`re using exactly the same font....

    Packpool,
    I believe the first thing to do is to update to 16.0.5.
    Adobe - Illustrator : For Macintosh

  • The ipod is disabled, when i plug it in to my pc it says it can not connect without the passcode being put into the ipod, how do i fix it?

    the ipod is disabled, when i plug it in to my pc it says it can not connect without the passcode being put into the ipod, how do i fix it?

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen        
    If recovery mode does not work try DFU mode.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • Why can't I create a document in my Facebook group on my iPad? It won't let me input any text into the text box field after I create a new document. Thanks.

    Why can't I create a document in my Facebook group on my iPad. It won't let me input any text into the text box field after I create a new document. Thanks.

    Just thought I'd add my solution, I decided to go with WebDAV and I think it actually works better than the iTunes way, the steps are pretty much the same but avoiding the iTunes interface just makes things easier and faster.
    I followed this guide but it does have a small mistake in the httpd-dav.conf file, on line 2, where it's WebServer/WebDAV">, it should be <Directory "/Library/WebServer/WebDAV">.
    The tricky part is setting permissions which if wrong will give you errors when connecting with the iPad, I opted to set all to Read&Write since my home network has a hardware firewall. Another convenience was to add an alias to the webdav share on the Desktop.
    I'm still expecting the call from Apple but even if they fix the iTunes I'm sticking with WebDAV, atleast until I see what's new with iOS5 and iCloud this fall which should bring true sync for documents (I'm hoping that they will offer encryption with my own keys, if not, then I'll probably keep using WebDAV).

  • I bought versions for iPad and for MacBook. At synchronization of documents on MacBook all smilies from the Emoji keyboard disappeared. It is impossible to insert them into the text manually. Smiles of Emoji are supported by the program for Mac? Help to s

    I bought versions for iPad and for MacBook. At synchronization of documents on MacBook all smilies from the Emoji keyboard disappeared. It is impossible to insert them into the text manually.
    Smiles of Emoji are supported by the program for Mac?
    Help to solve a problem, please.

    Same thing happened to me with my peruvian credit card in the peruvian app store, I want to buy an app, but it says that my credit card is "not supported in the Peruvian app store"

  • Why can't I paste anything into the Text window any more

    Hi Laura,
    Why cant I paste anything into the text window any more? I am using IE 7.0 (7.0.5730.13C0)
    Regards
    Ray Farmer

    I've seen some weird (temporary) cases, for example when ctrl+v suddenly did not work, but "right-click..paste" was still working. Also, when I was pasting the comment here, notice that the last line containing the date (i.e. the line containing May 27, 2011) moved to the top of the quote, while it was at the botton in the original location (probably soem extra html got dragged along, I have not investigated).
    (This was in Chrome.)
    LabVIEW Champion . Do more with less code and in less time .

  • For some reason my ipod touch says it has maximum number of free accounts activated when I try to sign into the cloud how do I fix this

    For some reason my ipod touch says it has maximum number of free accounts activated when I try to sign into the cloud how do I fix this. I have done the reset multiple times

    Dreat a new account on a device that still has the ability to create accounts
    icloud: The maximum number of free accounts have been activated on this iPhone.
    http://forums.macrumors.com/showthread.php?t=1242428

  • How do i change this code so when i select a track in the list box it goes into the text box

    Public Class Form3
    Dim numofrecords As Integer
    Dim NextID As Integer
    Dim RecordNumber As Integer
    Private Tableformat As String = "{0,-8}{1,-20}{2,-20}{3,-10}{4,-20}{5,-20}"
    Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    FileOpen(1, "Tracks.dat", OpenMode.Random, , , Len(Tracks))
    numofrecords = LOF(1) / Len(Tracks)
    If numofrecords = 0 Then
    NextID = numofrecords + 1
    Else
    FileGet(1, Tracks, numofrecords)
    NextID = Tracks.TrackID + 1
    End If
    FileClose(1)
    txtTrackID.Text = NextID.ToString
    End Sub
    Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
    ' Get the song info from the form
    Tracks.TrackID = txtTrackID.Text
    Tracks.Title = txttitle.Text
    Tracks.Artist = txtartist.Text
    Tracks.Genre = txtGenre.Text
    Tracks.Duration = txtduration.Text
    Tracks.era = txtera.Text
    Tracks.Otherinfo = txtBlurb.Text
    Tracks.IsDeleted = 0
    ' write the record to file
    FileOpen(1, "Tracks.dat", OpenMode.Random, , , Len(Tracks))
    FilePut(1, Tracks, numofrecords + 1)
    'Close file
    FileClose(1)
    ' add one to the number of records
    numofrecords = numofrecords + 1
    NextID = NextID + 1
    txtTrackID.Text = NextID
    ' place cursor in id box
    txtTrackID.Focus()
    'clear form
    txtartist.Text = ""
    txtduration.Text = ""
    txtera.Text = ""
    txtGenre.Text = ""
    txttitle.Text = ""
    End Sub
    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
    txtartist.Text = ""
    txtduration.Text = ""
    txtera.Text = ""
    txtGenre.Text = ""
    txttitle.Text = ""
    txtTrackID.Text = ""
    End Sub
    Private Sub lstsongs_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstsongs.SelectedIndexChanged
    'get selected record
    RecordNumber = lstsongs.SelectedIndex
    'lblDebug.Text = RecordNumber
    FileOpen(1, "Tracks.dat", OpenMode.Random, , , Len(Tracks))
    FileGet(1, Tracks, RecordNumber)
    FileClose()
    'populate the input boxes
    CurrentTracks = Tracks.TrackID.
    txtTrackID.Text = Tracks.ToString
    txtartist.Text = Tracks.Artist
    txtBlurb.Text =
    txtduration.Text = Tracks.Duration
    txtera.Text = Tracks.era
    txtGenre.Text = Tracks.Genre
    txttitle.Text = Tracks.Title
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
    Me.Close()
    End Sub
    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoad.Click
    'set the filename
    Filename = "Tracks.dat"
    'open the file
    FileOpen(1, FileName, OpenMode.Random, , , Len(Tracks))
    'check numnber of records in file
    numofrecords = LOF(1) / Len(Tracks)
    'close file
    FileClose(1)
    Tracks.TrackID = numofrecords + 1
    txtTrackID.Text = Tracks.TrackID
    End Sub
    Private Sub btnList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnList.Click
    'clear list box
    lstsongs.Items.Clear()
    'headings
    lstsongs.Items.Add(String.Format(Tableformat, "Track ID", "Title", "Artist", "Genre", "Duration", "Era"))
    'open file
    FileOpen(1, Filename, OpenMode.Random, , , Len(Tracks))
    ' Add records to list box
    Do While Not EOF(1)
    FileGet(1, Tracks)
    lstsongs.Items.Add(String.Format(Tableformat, _
    Tracks.TrackID, _
    Tracks.Title, Tracks.Artist, Tracks.Genre, _
    Tracks.Duration, Tracks.era))
    Loop
    'close file
    FileClose(1)
    End Sub
    Private Sub lblDebug_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblDebug.Click
    End Sub
    End Class

    Hello,
    Since a ListBox displays text then when you have a selected item simply use the Text property of the ListBox rather than SelectedItem which would be used if the data source was say an object i.e. setting the ListBox DataSource to a DataTable then we would
    cast SelectedItem to a DataRowView but if all you have is text using the ListBox Text property.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Moving into the text

    Since there are no arrows (-> <-), someone of you knows how to move into the message while texting?

    press and hold for the magnifying glass which allows you to move to specific places.
    Just tap if you want to move it somewhere... I get lucky most times and it goeswhere i want it to.

  • I used to be able to drag jpgs and gifs into the text block

    I used to be able to drag pics and animated gifs into my text block and now I cannot. Does anyone know why this is or how I can correct this? Version 3.5.1 Ichat
    Thanks!
      Mac OS X (10.4.7)  

    Do you have the View Mode set to Preview?
    Are you clicking the Point Control for the point you want to move before clicking on the Canvas?
    MtD

  • Posting Period coming into the rows at the query runtime & couldn't drop it

    Hi All,
    We have a query on an InfoCube that we have copied to the Multiprovider containing two cubes, exact copies of the original cubes.
    Two cubes are one for the previous years and one for the current year.
    Now, the query is copied from original cube to the MultiCube.
    The query looks exactly the same in the Query Designer. But when run in Analyzer or on Web, Posting Period is coming into the rows automatically and in Analyzer, when I double click on the Posting Period to take it away from the report, it doesn't go away. Similarly in web, I do not have a option 'Remove Drilldown from rows', against posting period. I have identified posting period in both the cubes in the MultiCube configuration.
    Thanks in advance for any suggestions that you have.
    Best Regards,
    - Shashi

    hmm, we have now something interesting....
    but this means that you have two structures defined in your query right?
    Is your query cell based? It looks to me that this is the case; you have elements using created using the posting period thus it can be moved to the free chars and must be included in the drilldown.
    Remove the posting period again and perform a check before saving the query; this may give the element defined with your posting period.
    hope this helps...
    Olivier.

  • Overset text will not go into the text box that is part of the master for the next page

    I am trying to (first time user) set up a simple trade-paperback sized book with some photos.  Have set up several masters for chapter title pages, chapter inner pages, etc.  When I copy text out of Word into InDesign, (copy/paste) the text overset box appears.  I load it, then go to the next page, which I have already formatted using one of the masters.  But when I select the desired text box ((Ctrl/shft) and click, the overset text forms a new text box, What am I doing wrong? thanks

    I have done, this did work right for at least the left side of the spread, but never for the right side -
    Make sure the left and right page master page text frames are threaded View>Extras>Show Text Threads. Here I have left and right page text boxes threaded on my A-master spread:
    Checking Smart Text Reflow can make adding long text to master frames easier:
    With Smart Text Reflow enabled I've released the  master page text box on page 1, note the released frame has a solid border, while the unreleased master page frames on subsequent pages are dotted indicating they are still master page items and not page items.
    The result of the paste:

  • Problems with the text graphic and the text itself.

    Hello everybody. I have been making a site in Adobe Muse CC and I've run into some troubles. The textboxes I've made are not like textboxes, in preview mode, but more like a picture. This also makes the text look blurry when you zoom into the page. Is there a way to make the text in the textboxes like a real text and not like a picture. Make the textmoxes so that you can mark the words and letters, just like you can in a normal website.

    I have tried several fonts but it's still blurry and unclear when I preview it in a browser.
    I believe it has something to do with the textboxes.
    Karamelrand | Smith'N'Jones  You can try and look at the page here. The text is like a picture.
    Is that fixable?

Maybe you are looking for

  • Issues with dynamic text box formatting

    I'm running into issues with using HTML formatting for a dymanic text field. I know these are quirky and I cannot figure out how to get the formatting proper. I have on my stage a dynamic text box called "content_txt" inside of a movie clip instance

  • Portal PL/SQL Item - getting connection id for Discoverer

    Finding the connection ID of a connection in Portal PL/SQL item. I am using a PL/SQL item in Portal to build a link to Oracle Discoverer. Everything is ok; except the user needs to enter a password to login to discoverer. I want to start discoverer p

  • Not Able To Call JavaScript Function in my JSP file

    Here is my code of jsp, its a form , now when i click on the submit button having value "check all", it doesnot call the function "CheckAll( )" which will just popup the alert box, when i click on the "check all" button but it gives following error o

  • Type conflict error for method of a class

    Hi all, I am getting a type conflict error in method Read of class CL_SWF_REP_ITEM2OBJECT, the error text is "A type conflict occurred when the program tried to passan actual parameter to the formal parameter 'EX_WI2OBJ_WIHDR' of the method 'READ' of

  • How to clean out junk on a mac?

    I notice a TON of stuff on my mac I have never even seen, and I wanted to know if there was a program to scan your computer for crap and clean it out? Thanks