RE: [xep-support] Another image scaling question

From: Chen, Cindy (C)(STP) (Cindy.Chen@guidant.com)
Date: Thu May 06 2004 - 06:25:23 PDT

  • Next message: Sebastian Fey: "[xep-support] dont use the resolution of an image"

    Hi Alexander,

    I have tried to set line-height="0pt" on the block, I am still getting the error stating:
            [warning] no space for an element, trying to recover

    As a result, I am still not seeing the image on the result. My changed code is attatched.

    BTW, I am running XEP 3.7.5.

    Thanks,
    Cindy

    -----Original Message-----
    From: Alexander Peshkov [mailto:peshkov@renderx.com]
    Sent: Thursday, May 06, 2004 4:28 AM
    To: Chen, Cindy (C)(STP)
    Subject: Re: [xep-support] Another image scaling question

    Hello Cindy,

    In cases when image is taller than available space and vertical
    scaling is performed you get an overflow. The reason is simple:
    height="100%" means "as high as parent reference area content
    rectangle", however fo:external-graphic is an inline-level element and
    thus preceded and followed by empty-space known as half-leading. As a
    result the whole content is higher then available space and XEP drops
    overflowed image. In order to fix this problem you can simply set
    line-height="0pt" on the block that enclose image.

    Best regards,
    Alexander Peshkov mailto:peshkov@renderx.com
    RenderX

    CCCS> Hi all,

    CCCS> I have another question regarding image scaling. I am trying to scale and place an image into one page. So I defined FO like following:
    CCCS> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    CCCS> <fo:layout-master-set>
    CCCS> <fo:simple-page-master page-width="110mm" page-height="150mm" master-name="sample">
    CCCS> <fo:region-body border="solid" region-name="xsl-region-body"/>
    CCCS> </fo:simple-page-master>
    CCCS> </fo:layout-master-set>
    CCCS> <fo:page-sequence master-reference="sample">
    CCCS> <fo:flow flow-name="xsl-region-body">
    CCCS> <fo:block>
    CCCS> <fo:external-graphic src="url(Images/spots.jpg)" display-align="center" text-align="center"
    CCCS> content-width="scale-to-fit" width="100%" content-height="scale-to-fit" height="100%"/>
    CCCS> </fo:block>
    CCCS> </fo:flow>
    CCCS> </fo:page-sequence>
    CCCS> </fo:root>

    CCCS> It worked fine as I expected. But one thing is that if I make the page width bigger than page height, I got an error stating:
    CCCS> [warning] no space for an element, trying to recover

    CCCS> Following is the two cases that will both cause the error:
    CCCS> <fo:simple-page-master page-width="110mm" page-height="150mm" master-name="sample" reference-orientation="90">
    CCCS> <fo:simple-page-master page-width="150mm" page-height="110mm" master-name="sample">

    CCCS> The image I am using is the one comes with the XEP sample code.

    CCCS> How could I avoid the error?

    CCCS> Thanks,
    CCCS> Cindy Chen

    CCCS> -------------------
    CCCS> (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    CCCS> in the body of the message to majordomo@renderx.com from the address
    CCCS> you are subscribed from.
    CCCS> (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html

    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html


    -------------------
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to majordomo@renderx.com from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html




    This archive was generated by hypermail 2.1.5 : Thu May 06 2004 - 06:41:57 PDT