Box containing text and image (fit frame to contents).

Hi all,
The best way I can describe what I am trying to achieve is to show you a picture.
So essentially, I'm looking to create a grey box, containing some text with an image floating to the right hand side. I want about 2mm space (padding) inside the grey box so no content goes right to the edge and I want the text to wrap around the image. The bit I'm finding tricky is when I go to use the 'Fit frame to content' option. I'm trying to remove the space indicated by the red arrows but if I anchor the image inside the text frame, the grey box shrinks to the height of the text and the image overflows.
This would be incredibly simple to achieve on the web, am I doing something wrong?
Any help/direction would be greatly appreciated.

Sorry, been out for an hour.
I understood that you want to have some variable height text frame (the gray box), and that this box should reduce in height to fit the text contained therein, but not  less than necessary for the bottom to be 2mm below the bottom edge of the variable height image (which I'm presuming is anchored to the first line of text in the frame) in a case where there is not sufficient text for fit frame to content to avoide making the frame shorter than the bottom of the image.
I believe this could be scripted, but that will still require you to run the script. You should ask over in InDesign Scripting
As far as a container that holds both text and image frames, yes, but only if you "paste into" a new frame after creating the two separately and grouping, which probably is not what you have in mind.

Similar Messages

  • How to fit frame to content when content contains anchored text box?

    Hi there
    I am creating a series of inline text frames within a text frame. Each of these inline frames contains text which includes an anchored text frame. If I tell my inline frames to fit to content they seem to ignore the anchored frames contained therein. Is there any way I can get them to consider the anchored frames they contain when they fit to content?
    I tried checking the geometric bounds of my anchored frame before and after its parent frame has fitted to content. Even when there has been no change in position the bounds after fitting to content seem to give numbers way off. I thought I might be able to reset the geometric bounds of the containing frame manually if the anchored frame therein had moved with the fit frame to content.
    Here is a snippet of my code:
    var anchoredBounds = anchoredFrame.geometricBounds;
    mainFrame.fit(FitOptions.FRAME_TO_CONTENT);
    mainFrame.texts.item(0).recompose;
    var newAnchoredBounds = anchoredFrame.geometricBounds;
    alert(anchoredBounds[0] + "; " + newAnchoredBounds[0]);
    So “mainFrame” is the text frame containing text and the anchored frame, “anchoredFrame”. “anchoredBounds[0]” seems to correlate with the top edge of the frame when I check it manually after the script has finished (when it hasn’t move with the fit to content). “newAnchorBounds[0]”, however, always gives numbers that are way off every time. Any ideas why this would be the case?
    And most importantly, can anyone suggest how I can get my “mainFrame” to consider the “anchoredFrame” contained in it when it fits to content?
    I’m using CS4 on a PC. Let me know if it would help to post more code, or if I haven’t explained myself clearly enough.

    Is there any way I can get them to consider the anchored frames they contain when they fit to content?
    @Graham – as long as ALL the anchored text frames are "inline" text frames,
    mainFrame.fit(FitOptions.FRAME_TO_CONTENT);
    should work as expected or at least sort of *.
    Without calculating anything at all.
    Just tested in InDesign CS5.5 (v7.5.3).
    Could it be that CS4 will fail on that?
    Of course, you can only rely on this, if the main text frame contains any "real" text at all. Not only the  special characters representations of the "inline" text frames. In that case the fit() method will do nothing at all.
    * it's debatable, if the fit() method yields desirable output.
    It depends on your expectations.
    See the following examples:
    1. Case 1:
    Text frame before fitting:
    2. Case 1:
    After fitting with the UI command, context menu: "fit frame to contents"
    (note the gap between the last baseline of the text and the text frame; note also  the new width)
    Is that the result you would expect? I guess not.
    3. Case 1:
    After fitting  programmatically with myTextframe.fit(FitOptions.FRAME_TO_CONTENT);
    4. Case 2:
    Before fitting
    same text frame as in #1, but different height
    5. Case 2:
    After fitting with the UI command, context menu: "fit frame to contents"
    A different width than in #2 and a gap at the bottom of the text frame!
    Not the desired result, I'd say…
    6. Case 2:
    After fitting  programmatically with myTextframe.fit(FitOptions.FRAME_TO_CONTENT);
    Same result as in #3
    So with scripting we could, at least, get consistent results.
    Of course, you could get the same results in the UI, if you double-click on the bottom center control point…
    Maybe it helps, if you are showing us some screen grabs:
    1. Your starting point
    2. The desired result
    Uwe

  • Dynamic text box, HTML Text with Image

    Hello Everyone,
    I am using Flash version 8. I have used the text tool and
    created a dynamic text box and have attached the UIScrollBar
    component to it. This text box is configured to allow the use of
    html text to be inputted to it. I have code that reads a file which
    contains a list of text files that I then read and place them into
    the text box. The user can use the scroll bar to scroll through all
    the text.
    I have created an image that is a picture of the tab portion
    of a file folder. On the tab I have place some text. This was all
    done in Photoshop. This tab image is used to separate the different
    stories in the text box. The image is save as a jpeg file
    Everything you have just read works with out any problems.
    Now for the problem!
    This image is only 20 pixels tall and the text is not very
    readable. As we all know the HTML tags are very limited in Flash 8.
    Ideally I would like to put the text and image in to the text
    box as I would normally do. Then place text on top of the image and
    have it all scroll properly with in the text box.
    I have taken the tab image and converted it in to a graph
    symbol and then put the text on top of the image. This looks good;
    however I don’t know how (or if it is even possible) to place
    the graphic symbol in to the text box at the correct place within
    the text.
    Does anyone have ideas on what may work? Remember that the
    image I am working with is only 20 pixels tall which is why the
    text quality on the image is so poor.
    Thank you all for any help you may provide,
    Steve

    Yes Tim I am using the <img> tag and I know that I
    can’t place text over the image. I have set the height and
    width to be the exact size of the image. However When you go to the
    webpage it will open the movie to the maximum size based on the
    resolution of your display; however I do maintain the aspect ratio
    of the movie. For testing I did set a fix size to the size of the
    movie. Sometimes the fix size (1000x750) looks better and sometimes
    a larger size (example 1280x1024). I believe that the main problem
    is the fact the size of the image is 670 pixels wide by 25 pixels
    high and of the 25 pixels the text is only 18 pixels tall. In
    Photoshop this makes it about a 1.75 point font. As you can see the
    real problem is that I don’t have enough pixels to make up
    the text. This is why I am looking for an alterative way to create
    the text.
    I tried importing the image into flash as a graphic symbol
    and then using the text tool to create the text. The results looked
    real sharp, the text was nice and crisp (just what I wanted). The
    problem is that I could not find a way to place the graphic symbol
    into the dynamic text area like id did using the <img> tag.
    This symbol needs to scroll as you scroll the text in the text
    area.
    This is why I am asking for help. I am looking for some ideas
    that may work.
    Thank you,
    Steve

  • Resizing text and images with actions and keeping it resized for the next slides, how to?

    Hello everybody,
    I searched over the net and in this support section for a solution to my problem, but i didnt find any, so...here I am asking you experts.
    Through a particular use of different actions I make a logo "compose" in the first slide of my presentation (the logo is composed by text and images that interact), then in the second slide i make it resize so it goes 50% of its size and moves down like a TV logo, in the corner of the slide, and I want it to stay there for all the lenght of the presentation.
    It might be a stupid problem, but I didnt understand how to keep it there, 50% of its size and always in that position. If i duplicate the slide I obviously duplicate the 100%-size-logo, not its 50%-size-version, and if i shrink it in order to make it be 50% of its size the text size doesnt shrink so i have to change the text size manually, but the visual effect is imperfect.
    Lets summarize:
    slide 1: text appears, image appears, the text and the image move and "compose" the logo
    slide 2: the complete logo reduces its size to 50% and moves in the lower corner of the presentation, in the place I want it to be for, lets say, 20 slides
    slide 3: i want to have this logo already reduced in size and in its position, in the right lower corner, but if i try to group the different parts of the composed logo and i try to squeeze them the font doesnt change its size, I only squeeze the area that the text occupies.
    Some help please guys?
    Thanks in advance,
    Dom-
    (add: the problem is kind of similar to this: https://discussions.apple.com/message/9179367#9179367 . the idea of making a slide that contains the logo and text in the exact positions they would be after the move and scale actions is good and that was my first attempt, the probem is that it looks impossible to me to create a second "little" version of the logo that looks exactly the same of the first one that i reduced, so i hope there is some way to tell the app to use "the first logo, only resized the way i want", and thats the point where the problem with the size of the text comes out)

    Hi pritam,
    The “maintain proportions of window for different monitor
    resolutions” property will maintain the proportional size of the front panel
    (its x and y sizes) when opened in a different resolution. The front panel
    objects will not be resized and will appear larger (and may not fit inside the
    front panel) when saved in a higher resolution, and moved to a lower
    resolution. You can use the “Keep window proportions” property to achieve the
    same results.
    To have both the front panel dimensions and front panel
    controls scale, you need to have both the above property and the “scale all
    objects on front panel as the window resizes” selected. The labels will not be
    resized by this.
    I tried using both properties on two monitors and noticed
    that the change does not occur when the resolutions between the monitors are
    different. I had to lower both monitors’ resolution to see the change work
    properly.
    Please post back if you have any questions. Have a great day!
    Ryan D.
    District Sales Manager for Boston & Northern New England
    National Instruments

  • How can i copy line with text and image to ms word

    When I insert an image in textflow using InlineGraphicElement it works, but when I copy the line with the image to MS Word it copies only the text (not the image).
    How can i copy the image to MS Word?

    If you want copy formatted text and image to MS Word, you need to give MS Word rtf markup, because Word can recognize rtf markup but not TLF markup.
    So you need to create a custom clipboard to paste a rtf markup. It's a large feature for you, because you need a tlf-rtf converter in your custom clipboard.
    TLF Custom Clipboard Example:
    package
        import flash.display.Sprite;
        import flash.desktop.ClipboardFormats;
        import flashx.textLayout.container.ContainerController;
        import flashx.textLayout.conversion.ITextImporter;
        import flashx.textLayout.conversion.TextConverter;
        import flashx.textLayout.edit.EditManager;
        import flashx.textLayout.elements.*;
        import flashx.undo.UndoManager;
        // Example code to install a custom clipboard format. This one installs at the front of the list (overriding all later formats)
        // and adds a handler for plain text that strips out all consonants (everything except aeiou).
        public class CustomClipboardFormat extends Sprite
            public function CustomClipboardFormat()
                var textFlow:TextFlow = setup();
                TextConverter.addFormatAt(0, "vowelsOnly_extraList", VowelsOnlyImporter, AdditionalListExporter, "air:text" /* it's a converter for cliboard */);
            private const markup:String = '<TextFlow whiteSpaceCollapse="preserve" version="2.0.0" xmlns="http://ns.adobe.com/textLayout/2008"><p><span color=\"0x00ff00\">Anything you paste will have all consonants removed.</span></p></TextFlow>';
            private function setup():TextFlow
                var importer:ITextImporter = TextConverter.getImporter(TextConverter.TEXT_LAYOUT_FORMAT);
                var textFlow:TextFlow = importer.importToFlow(markup);
                textFlow.flowComposer.addController(new ContainerController(this,500,200));
                textFlow.interactionManager = new EditManager(new UndoManager());
                textFlow.flowComposer.updateAllControllers();
                return textFlow;
    import flashx.textLayout.conversion.ITextExporter;
    import flashx.textLayout.conversion.ConverterBase;
    import flashx.textLayout.conversion.ITextImporter;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.elements.IConfiguration;
    import flashx.textLayout.elements.TextFlow;
    class VowelsOnlyImporter extends ConverterBase implements ITextImporter
        protected var _config:IConfiguration = null;
        /** Constructor */
        public function VowelsOnlyImporter()
            super();
        public function importToFlow(source:Object):TextFlow
            if (source is String)
                var firstChar:String = (source as String).charAt(0);
                firstChar = firstChar.toLowerCase();
                // This filter only applies if the first character is a vowel
                if (firstChar == 'a' || firstChar == 'i' || firstChar == 'e' || firstChar == 'o' || firstChar == 'u')
                    var pattern:RegExp = /([b-df-hj-np-tv-z])*/g;
                    source = source.replace(pattern, "");
                    var importer:ITextImporter = TextConverter.getImporter(TextConverter.PLAIN_TEXT_FORMAT);
                    importer.useClipboardAnnotations = this.useClipboardAnnotations;
                    importer.configuration = _config;
                    return importer.importToFlow(source);
            return null;
        public function get configuration():IConfiguration
            return _config;
        public function set configuration(value:IConfiguration):void
            _config = value;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.ListElement;
    import flashx.textLayout.elements.ListItemElement;
    class AdditionalListExporter extends ConverterBase implements ITextExporter
        /** Constructor */
        public function AdditionalListExporter()   
            super();
        public function export(source:TextFlow, conversionType:String):Object
            if (source is TextFlow)
                source.getChildAt(source.numChildren - 1).setStyle(MERGE_TO_NEXT_ON_PASTE, false);
                var list:ListElement = new ListElement();
                var item1:ListItemElement = new ListItemElement();
                var item2:ListItemElement = new ListItemElement();
                var para1:ParagraphElement = new ParagraphElement();
                var para2:ParagraphElement = new ParagraphElement();
                var span1:SpanElement = new SpanElement();
                span1.text = "ab";
                var span2:SpanElement = new SpanElement();
                span2.text = "cd";
                list.addChild(item1);
                list.addChild(item2);
                item1.addChild(para1);
                para1.addChild(span1);
                item2.addChild(para2);
                para2.addChild(span2);
                source.addChild(list);
                var exporter:ITextExporter = TextConverter.getExporter(TextConverter.TEXT_LAYOUT_FORMAT);
                exporter.useClipboardAnnotations = this.useClipboardAnnotations;
                return exporter.export(source, conversionType);   
            return null;

  • Disappearing text and image

    I created letterhead in Pages for my lil brothers film production company. Saved. Exported the document to Word. Sent it to him. So far so good. Looks great. Each time he opens the document in WORD and trie to alter the text by selecting and typing over it both the text and the graphics disappear.
    Is there any way to correct this? I really love the letterhead and have been having problems recreating it in other software.

    Thanks for a quick response. I see yr point. The thing is I am setting up a table cell editor and a renderer. It is easy to set up the editor with a combo box. For the renderer, I am using a default cell renderer and I want to make it look like a combo box as well. Since the default cell renderer extends JLabel, I do something like
    comboBoxRenderer = new DefaultTableCellRenderer();
    ImageIcon image = new ImageIcon("image/Play16.gif");
    comboBoxRenderer.setIcon(image);
    comboBoxRenderer.setHorizontalTextPosition(JLabel.LEADING);
    which does not get me the effect I want. I can put more pixels between the text and image using setIconTextGap. But it is not fool proof. I think I will try yr approach, but then it gets a little complicated. Would have been good if there is simpler way. I will appreciate yr thoughts

  • Text and images in the same component?

    Ok... a lil help please :
    into what component can i put text and images at the same time
    as in...
    example, what component could contain data like this :
    Hello this is me <imageofmyself> and this is my house <imageofmyhouse>... bye all !
    thanks in advance,
    Jonathan, a.k.a. Kyraz

    You could use a Swing HTMLPANE or draw it all onto a
    BufferedImage and display that (code posted under 2D graphics thread).
    MArk

  • Can only see text and image outlines

    I am new and got stuck!
    When I run the fla, it runs fine. However I have hit some setting and all I can see is the texts and image outlines...
    Here are some screen shots:
    This is what it looks like when i run it:
    Please help! its probably the most fundamental thing ever but I am stuck and it is hot and I'm frustrated. Thank-you

    Your timeline is set to outline view. At the top of the timeline, in the section where the names of each layer are shown, there are three icons: an eye, a lock and a box. Click on the box icon to switch between outline and normal view.

  • Drag and drop the text and image

    Hi,
    I need help in drag and drop text and image.
    I am able to drag and drop the text and image in doc but  i want to drag the text in text frame and image in image frame only.
    For this how to get textframe id or is there any other way to do this. Pls help me if anyone know how to do this one.
    Thanks
    Arun

    This thread is pretty old, but this can help anyone in the future:
    To handle a drop in InDesign, you have to implement your own custom CDragDropTargetFlavorHelper. You can find a working example in SDK Sample. Take a look at BasicDragDrop.sdk project in the SDK.

  • Pausing a sequence of text and images

    Ok, I have 6 tabs down the side of the main screen where
    users can hover over to select which tab to view. All they do is
    hover to select the tab - no clicking. The sequence changes from
    tab to tab sequentially (if a tab is selected then the sequence
    just carries on from the tab that was selected. So it starts on tab
    1 if the user hover over tab 4 then after that tab information is
    displayed for 5 seconds then tab 5 will play then 6...) with each
    tab having its individual text and images.
    My problem is that I want the whatever tab the user is
    hovering over to stay. So I will only want the sequence to carry on
    running when the user has not got the cursor on a tab.
    I am at the stage at the moment where I can select any of the
    tabs (they are buttons) by hovering over them by using the goto
    text, then the sequence continues. I need the sequence to stay
    until the cursor is off the tab. One other thing, each tab is set
    to display for 5 seconds before it changes again.
    Someone please help. I feel as though this may be quite an
    easy problem to solve?!?
    Thanks
    Dan

    Priscilla,
    I routinely combine 10 lines of 36 pt bible or lecture text to a suitable background using Boris Title 3D.
    Many times the text is too long to fit the screen using Boris, so I devide it into 2 or more parts with no transition between sections.
    In my case, the text is on the screen as the speaker quotes them.
    David

  • How to extract text and image information from postscript file

    I want to write a programe,and extract text and image information from postscript file using Java.Is it possible? How to extract ?
    Thank!

    First of all, PostScript is not a "text" file. It can and often does contain binary data. Since PostScript streams often contain nested procedures, unless you process the procedure definitions and can "execute" them, you cannot simply "scan" a file to get what you want. No, I can't talk about this in detail since it is quite complex. But Adobe does have the
    PostScript Language Reference Manual on-line for download at
    . Look that over and you will have a fairly healthy respect as to the task involved.
    - Dov

  • Display text and image over Video Image in applet

    Hi
    I am working in JMF for a video applet.
    I have a doubt ,how we can display text and image over Video Image.
    Is anybody know how we can draw text over Video Image,pls sent a small code how can do it in applet?.
    I can do it in a frame,but it not work in a applet !
    CHT

    it is very much possible in a htmlb:button.
    its same as how you have done it in xhtmlb:toolbarButton
    working code
            <%
      data image type   ref to cl_htmlb_image.
      data: image_string type string.
      create object image.
      image->id = 'IEX'.
      image->src = cl_bsp_mimes=>sap_icon( 'ICON_EXECUTE_OBJECT' ).
      image->tooltip = 'Find the Link'.
      clear image_string.
      image_string = image->IF_BSP_BEE~RENDER_TO_STRING( page_context ).
              %>
              <htmlb:button id     = "EX"
                            text   = "<%= image_string %> Execute"
                            encode = "FALSE"
                            onClick = "EXECUTE"/>
    Regards
    Raja

  • How can I combine a lot of text and images on the same screen?

    How can I combine a lot of text and images on the same screen?  I can get a couple of words on the screen with a graphic but not 10 lines.  I need 10 lines on the page with the image. 

    Priscilla,
    I routinely combine 10 lines of 36 pt bible or lecture text to a suitable background using Boris Title 3D.
    Many times the text is too long to fit the screen using Boris, so I devide it into 2 or more parts with no transition between sections.
    In my case, the text is on the screen as the speaker quotes them.
    David

  • Perform Save for Styled Text and images

    I have build a text editor
    I am using a JTextPane
    but facing a problem with saving and opening the files with Styled text and images.
    Can any body help me out with a sample code
    Thank you

    Hi,
    If you want to save the file so that only your application can read the contents back, then you can serialize the Document of the JTextPane to the file and then read it back. This is the simplest approach.
    Serialize myTextPane.getDocument(); and while opening do
    Deserialize Document
    StyledDocument myDocument = stream.readObject();
    myTextPane.setDocument(myDocument);
    and you are done, irrespective of whether text pane contains only text or images or any other combination.
    Regards,
    [email protected]

  • The latest Firefox version won't expand to make text and images more visible on my 32" screen, although I have tried to adjust the advanced Windows appearance settings in the same way that has worked in previous versions of Firefox.

    Normally I have had to go to Control Panel; Appearances and Themes; Display; Settings; Advanced; Custom; and then I adjust the Customize Setting to 155% (149 dpi). I have hit on this setting through trial and error; larger and icons like the cursor get big and fuzzy. Smaller than 155% and text and images are tiny on the 32" wide screen. This time that procedure doesn't seem to work. The text and images remain too small regardless of setting, although the cursor icon gets big. I can manually zoom the pages, but that is clumsy and has to be redone. Does anyone know of an easy setting fix? I am not too smart about this stuff--mostly trial and error, but I do want to be able to enjoy my wide screen. Thanks!

    Normally I have had to go to Control Panel; Appearances and Themes; Display; Settings; Advanced; Custom; and then I adjust the Customize Setting to 155% (149 dpi). I have hit on this setting through trial and error; larger and icons like the cursor get big and fuzzy. Smaller than 155% and text and images are tiny on the 32" wide screen. This time that procedure doesn't seem to work. The text and images remain too small regardless of setting, although the cursor icon gets big. I can manually zoom the pages, but that is clumsy and has to be redone. Does anyone know of an easy setting fix? I am not too smart about this stuff--mostly trial and error, but I do want to be able to enjoy my wide screen. Thanks!

Maybe you are looking for