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 ThiagoHP <th...@gmail.com> on 2011/09/22 04:45:57 UTC

with content-height="scale-to-fit" and content-width="scale-to-fit"

Hi!

FO and Apache FOP newbie here. :)

I need to include images using <fo:external-graphic> with no possibility of
knowing their width and height previously (it's part of a larger processing
pipeline). Some images can be large and I'd like to scale them down so they
can fit completely inside a page. I tried <fo:external-graphic src="..." 
scaling="uniform" inline-progression-dimension.maximum="90%"
content-height="scale-to-fit" content-width="scale-to-fit">, but an image,
which is 2x higher than wide, has its lower part clipped.

Am I using the right attributes and their values?

Thanks in advance. :)

Thiago

-- 
View this message in context: http://old.nabble.com/%3Cfo%3Aexternal-graphic%3E-with-content-height%3D%22scale-to-fit%22-and-content-width%3D%22scale-to-fit%22-tp32503789p32503789.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: with content-height="scale-to-fit" and content-width="scale-to-fit"

Posted by Pascal Sancho <pa...@takoma.fr>.
Hi Thiago,

what you need is "scale-down-to-fit" (that exists and FOP implements it,
see [1] ;) ).

[1] http://www.w3.org/TR/xsl/#content-width

Le 22/09/2011 06:41, Sergiu Dumitriu a écrit :
> On 09/21/2011 10:45 PM, ThiagoHP wrote:
>>
>> Hi!
>>
>> FO and Apache FOP newbie here. :)
>>
>> I need to include images using<fo:external-graphic>  with no possibility of
>> knowing their width and height previously (it's part of a larger processing
>> pipeline). Some images can be large and I'd like to scale them down so they
>> can fit completely inside a page. I tried<fo:external-graphic src="..."
>> scaling="uniform" inline-progression-dimension.maximum="90%"
>> content-height="scale-to-fit" content-width="scale-to-fit">, but an image,
>> which is 2x higher than wide, has its lower part clipped.
> 
> inline-progression-dimension.maximum only specifies the maximum width, 
> so the behavior is normal: you don't limit the height. Also add:
> 
> block-progression-dimension.maximum="90%"
> 
>> Am I using the right attributes and their values?
>>
>> Thanks in advance. :)
>>
>> Thiago

-- 
Pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: with content-height="scale-to-fit" and content-width="scale-to-fit"

Posted by Sergiu Dumitriu <se...@xwiki.com>.
On 09/21/2011 10:45 PM, ThiagoHP wrote:
>
> Hi!
>
> FO and Apache FOP newbie here. :)
>
> I need to include images using<fo:external-graphic>  with no possibility of
> knowing their width and height previously (it's part of a larger processing
> pipeline). Some images can be large and I'd like to scale them down so they
> can fit completely inside a page. I tried<fo:external-graphic src="..."
> scaling="uniform" inline-progression-dimension.maximum="90%"
> content-height="scale-to-fit" content-width="scale-to-fit">, but an image,
> which is 2x higher than wide, has its lower part clipped.

inline-progression-dimension.maximum only specifies the maximum width, 
so the behavior is normal: you don't limit the height. Also add:

block-progression-dimension.maximum="90%"

> Am I using the right attributes and their values?
>
> Thanks in advance. :)
>
> Thiago
>


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org