Search code examples
apache-fleximagetlf

Too much space at the top of image in TLF using Flex3


When insert an image into TLF in flex3, I found that image in TLF is displayed in a square area. so there is some space at the top of the image. See the attached image for this problem.

too much space at the top of image in TLF in Flex3

How to remove this space? I try the following method, But it doesn't work!

var graphic_element:InlineGraphicElement = IEditManager(activeFlow.interactionManager).insertInlineGraphic(foreignElementUrl, width, height, "none");

graphic_element.paddingTop = 0;
graphic_element.paddingBottom = 0;
graphic_element.paddingRight = 0;
graphic_element.paddingLeft = 0; 
IEditManager(activeFlow.interactionManager).applyParagraphFormat(graphic_element);

Solution

  • Maybe this?

    inlineGraphicElement.textDecoration = null;
    inlineGraphicElement.alignmentBaseline = TextBaseline.ASCENT;
    inlineGraphicElement.lineHeight = "100%";