[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] is it possible to resize an image to display smaller than the original

Subject: Re: [xsl] is it possible to resize an image to display smaller than the original
From: David Ryan <dgdunk@xxxxxxxxx>
Date: Mon, 2 Apr 2012 17:54:34 -0400

ok. the resize finally works using content-height="50pt" content-width="50pt"

the final issue is getting the fo:external-graphic src to pull the
file location/name that is being passed in the xml.

I have tried every combination I could find and trying to assign a
variable equal to the location.

<xsl:variable name="photo" select="data/photoimg"/>
<fo:block-container height="28.68mm">
	<fo:block-container overflow="hidden" display-align="before">
		<fo:block text-align="start">
			<fo:external-graphic src="'url({$photo})'" content-height="50pt"

if I hardcode the file location in the url - it will work but I need
to pass that in the xml as this routine gets called for many different

Does anyone know what I am doing wrong or have a solution to this issue?

I can't begin to grateful enough if someone can help solve this.


On Sun, Apr 1, 2012 at 3:09 AM, davep <davep@xxxxxxxxxxxxx> wrote:
> On 31/03/12 14:39, David Ryan wrote:
>> I changed the xsl to use your suggestion:
>>  <fo:external-graphic src="file:{/data/Photo}"/>
>> but when I run it, it doesn't find the image file saying Image not
>> available.  I confirmed the image is in the referenced location.  any
>> ideas?
> http://www.w3.org/TR/xsl/#fo_external-graphic
> try
> <fo:external-graphic src="url(file.jpg)" />
> If you can, make the file relative rather than absolute and
> don't have spaces in path or filenames.
> Two attributes useful for scaling are
> content-height="3" scaling="uniform"
> or content-width
> regards
> --
> Dave Pawson
> http://www.dpawson.co.uk

Current Thread