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 Kendall Shaw <sk...@atypon.com> on 2008/11/13 20:31:54 UTC
scale image if too large
Looking at the mailing list archives, it looks like I can't do this, but
I thought I'd check.
If the image will fit within some size, I don't want to scale the image.
If it is too large, I want to scale it to fit. Can it be done, without
knowing the dimensions of the image?
Kendall
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: scale image if too large
Posted by Kendall Shaw <sk...@atypon.com>.
Yes, it works. Thanks!
Jeremias Maerki wrote:
> It does work. scale-down-to-fit is supported since FOP 0.95 beta and is
> exactly what is needed.
>
> Basically, you need to do this:
> <fo:external-graphic src="my.jpg"
> inline-progression-dimension.maximum="100%"
> content-width="scale-down-to-fit"/>
>
> On 13.11.2008 20:39:21 Andreas Delmelle wrote:
>
>> On 13 Nov 2008, at 20:31, Kendall Shaw wrote:
>>
>> Hi
>>
>>
>>> Looking at the mailing list archives, it looks like I can't do this,
>>> but I thought I'd check.
>>>
>>> If the image will fit within some size, I don't want to scale the
>>> image. If it is too large, I want to scale it to fit. Can it be
>>> done, without knowing the dimensions of the image?
>>>
>> It can be, in XSL 1.1. I can't immediately remember if 0.95 already
>> supports it, but I know "scale-down-to-fit" is a supported value for
>> content-height/content-width in FOP Trunk.
>>
>> HTH!
>>
>> Cheers
>>
>> Andreas
>>
>>
>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: scale image if too large
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
It does work. scale-down-to-fit is supported since FOP 0.95 beta and is
exactly what is needed.
Basically, you need to do this:
<fo:external-graphic src="my.jpg"
inline-progression-dimension.maximum="100%"
content-width="scale-down-to-fit"/>
On 13.11.2008 20:39:21 Andreas Delmelle wrote:
> On 13 Nov 2008, at 20:31, Kendall Shaw wrote:
>
> Hi
>
> > Looking at the mailing list archives, it looks like I can't do this,
> > but I thought I'd check.
> >
> > If the image will fit within some size, I don't want to scale the
> > image. If it is too large, I want to scale it to fit. Can it be
> > done, without knowing the dimensions of the image?
>
> It can be, in XSL 1.1. I can't immediately remember if 0.95 already
> supports it, but I know "scale-down-to-fit" is a supported value for
> content-height/content-width in FOP Trunk.
>
> HTH!
>
> Cheers
>
> Andreas
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: scale image if too large
Posted by Andreas Delmelle <an...@telenet.be>.
On 13 Nov 2008, at 20:31, Kendall Shaw wrote:
Hi
> Looking at the mailing list archives, it looks like I can't do this,
> but I thought I'd check.
>
> If the image will fit within some size, I don't want to scale the
> image. If it is too large, I want to scale it to fit. Can it be
> done, without knowing the dimensions of the image?
It can be, in XSL 1.1. I can't immediately remember if 0.95 already
supports it, but I know "scale-down-to-fit" is a supported value for
content-height/content-width in FOP Trunk.
HTH!
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org