You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Florence Deforge <fl...@europe.planete-inter.fr> on 2002/06/04 17:42:35 UTC

external-graphic width & height

Hi

I need to resize some gif images which are to be displayed in a pdf doc.

I tried to insert the following code inside a block or a table-cell :
<fo:external-graphic width="75%" height="75%" text-align="center">
    <xsl:attribute name="src">
        <xsl:text>file:</xsl:text>
        <xsl:value-of select="image"/>
    </xsl:attribute>
</fo:external-graphic>

Whatever percentage or absolute size is set, the graphic is displayed with
same size (which is not the original size as well).

Could anyone advice please ?

Thanks in advance
Florence



Re: external-graphic width & height

Posted by florence deforge <fl...@europe.planete-inter.fr>.
Thanks ...
Actually I noticed that my fo works (using absolute measure as you pointed)
on one machine but not on the other. It sounds as if I had a config problem
with fop on my machine ...
Both are Win2000 Pro with JRE 1.3.1.02 and fop0.20.2 ...


----- Original Message -----
From: "J.Pietschmann" <j3...@yahoo.de>
To: <fo...@xml.apache.org>
Sent: Tuesday, June 04, 2002 9:41 PM
Subject: Re: external-graphic width & height


> Florence Deforge wrote:
> > Hi
> >
> > I need to resize some gif images which are to be displayed in a pdf doc.
> >
> > I tried to insert the following code inside a block or a table-cell :
> > <fo:external-graphic width="75%" height="75%" text-align="center">
> >     <xsl:attribute name="src">
> >         <xsl:text>file:</xsl:text>
> >         <xsl:value-of select="image"/>
> >     </xsl:attribute>
> > </fo:external-graphic>
> >
> > Whatever percentage or absolute size is set, the graphic is displayed
with
> > same size (which is not the original size as well).
> >
> > Could anyone advice please ?
>
> It seems that a percental width does not work on
> fo:external-graphic. Use an absolute measure like width="5cm".
> Note that "75%" won't scale the image to 75% of the original
> width, even if it worked, it would scale the image to 75% of
> the width of the enclosing reference area. Note further that
> when it comes to rendering of bitmapped images to physical
> devices your definition of "original size" may be quite
> different from anyone's else, but still everyone is right.
>
> J.Pietschmann
>
>
>
>


Re: external-graphic width & height

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Florence Deforge wrote:
> Hi
> 
> I need to resize some gif images which are to be displayed in a pdf doc.
> 
> I tried to insert the following code inside a block or a table-cell :
> <fo:external-graphic width="75%" height="75%" text-align="center">
>     <xsl:attribute name="src">
>         <xsl:text>file:</xsl:text>
>         <xsl:value-of select="image"/>
>     </xsl:attribute>
> </fo:external-graphic>
> 
> Whatever percentage or absolute size is set, the graphic is displayed with
> same size (which is not the original size as well).
> 
> Could anyone advice please ?

It seems that a percental width does not work on
fo:external-graphic. Use an absolute measure like width="5cm".
Note that "75%" won't scale the image to 75% of the original
width, even if it worked, it would scale the image to 75% of
the width of the enclosing reference area. Note further that
when it comes to rendering of bitmapped images to physical
devices your definition of "original size" may be quite
different from anyone's else, but still everyone is right.

J.Pietschmann